|
7 | 7 |
|
8 | 8 | def destinations(platform: 'iphonesimulator')
|
9 | 9 | if platform == 'iphonesimulator'
|
10 |
| - if xcode_version.start_with?('9.4') |
| 10 | + if xcode_version.start_with?('10') |
| 11 | + [ 'name=iPhone 5s,OS=12.0', |
| 12 | + 'name=iPhone 6,OS=12.0', |
| 13 | + 'name=iPhone 6s Plus,OS=12.0', |
| 14 | + 'name=iPhone SE,OS=12.0', |
| 15 | + 'name=iPad Air 2,OS=12.0', |
| 16 | + 'name=iPad Pro (9.7-inch),OS=12.0', |
| 17 | + 'name=iPad Pro (12.9-inch),OS=12.0' |
| 18 | + ] |
| 19 | + elsif xcode_version.start_with?('9.4') |
11 | 20 | [ 'name=iPhone 5s,OS=11.4',
|
12 | 21 | 'name=iPhone 6,OS=11.4',
|
13 | 22 | 'name=iPhone 6s Plus,OS=11.4',
|
@@ -70,7 +79,11 @@ def destinations(platform: 'iphonesimulator')
|
70 | 79 | ]
|
71 | 80 | end
|
72 | 81 | elsif platform == 'watchsimulator'
|
73 |
| - if xcode_version.start_with?('9.4') |
| 82 | + if xcode_version.start_with?('10') |
| 83 | + [ 'name=Apple Watch Series 4 - 40mm,OS=5.0', |
| 84 | + 'name=Apple Watch Series 4 - 44mm,OS=5.0' |
| 85 | + ] |
| 86 | + elsif xcode_version.start_with?('9.4') |
74 | 87 | [ 'name=Apple Watch Series 3 - 38mm,OS=4.3',
|
75 | 88 | 'name=Apple Watch Series 3 - 42mm,OS=4.3'
|
76 | 89 | ]
|
@@ -100,7 +113,10 @@ def destinations(platform: 'iphonesimulator')
|
100 | 113 | ]
|
101 | 114 | end
|
102 | 115 | elsif platform == 'appletvsimulator'
|
103 |
| - if xcode_version.start_with?('9.4') |
| 116 | + if xcode_version.start_with?('10') |
| 117 | + [ 'name=Apple TV 4K,OS=12.0' |
| 118 | + ] |
| 119 | + elsif xcode_version.start_with?('9.4') |
104 | 120 | [ 'name=Apple TV 4K,OS=11.4'
|
105 | 121 | ]
|
106 | 122 | elsif xcode_version.start_with?('9.3')
|
@@ -157,7 +173,16 @@ namespace :build do
|
157 | 173 | t.add_build_setting('CODE_SIGN_IDENTITY', '')
|
158 | 174 | t.add_build_setting('CODE_SIGNING_REQUIRED', 'NO')
|
159 | 175 | end
|
160 |
| - if xcode_version.start_with?('9.4') |
| 176 | + if xcode_version.start_with?('10') |
| 177 | + t.add_build_setting('SWIFT_VERSION', '4.2') |
| 178 | + if platform == 'iphonesimulator' |
| 179 | + t.add_destination('name=iPhone 7,OS=12.0') |
| 180 | + elsif platform == 'watchsimulator' |
| 181 | + t.add_destination('name=Apple Watch Series 4 - 44mm,OS=5.0') |
| 182 | + elsif platform == 'appletvsimulator' |
| 183 | + t.add_destination('name=Apple TV 4K,OS=12.0') |
| 184 | + end |
| 185 | + elsif xcode_version.start_with?('9.4') |
161 | 186 | t.add_build_setting('SWIFT_VERSION', '4.1')
|
162 | 187 | if platform == 'iphonesimulator'
|
163 | 188 | t.add_destination('name=iPhone 7,OS=11.4')
|
@@ -217,12 +242,19 @@ namespace :build do
|
217 | 242 |
|
218 | 243 | task :carthage do
|
219 | 244 | sh %[echo 'github \"kishikawakatsumi/KeychainAccess\"' > Cartfile]
|
220 |
| - if xcode_version.start_with?('8') |
221 |
| - sh %[echo SWIFT_VERSION=\"3.0\" > swift3.xcconfig] |
222 |
| - sh %[XCODE_XCCONFIG_FILE=`pwd`/swift3.xcconfig carthage update --no-use-binaries] |
| 245 | + if xcode_version.start_with?('10') |
| 246 | + sh %[echo SWIFT_VERSION=\"4.2\" > swift.xcconfig] |
| 247 | + elsif xcode_version.start_with?('9.4') |
| 248 | + sh %[echo SWIFT_VERSION=\"4.1\" > swift.xcconfig] |
| 249 | + elsif xcode_version.start_with?('9.3') |
| 250 | + sh %[echo SWIFT_VERSION=\"4.1\" > swift.xcconfig] |
| 251 | + elsif xcode_version.start_with?('9') |
| 252 | + sh %[echo SWIFT_VERSION=\"4.0\" > swift.xcconfig] |
223 | 253 | else
|
224 |
| - sh %[carthage update --no-use-binaries] |
| 254 | + sh %[echo SWIFT_VERSION=\"3.0\" > swift.xcconfig] |
225 | 255 | end
|
| 256 | + sh %[XCODE_XCCONFIG_FILE=`pwd`/swift.xcconfig carthage update --no-use-binaries] |
| 257 | + sh %[find . -name '*.bcsymbolmap' | xargs grep swiftlang] |
226 | 258 | end
|
227 | 259 | end
|
228 | 260 |
|
@@ -255,8 +287,10 @@ namespace :test do
|
255 | 287 | t.coverage = true
|
256 | 288 | t.build_dir = 'build'
|
257 | 289 | t.hide_shell_script_environment = true
|
258 |
| - if xcode_version.start_with?('9.4') |
| 290 | + if xcode_version.start_with?('10') |
259 | 291 | t.add_build_setting('SWIFT_VERSION', '4.2')
|
| 292 | + elsif xcode_version.start_with?('9.4') |
| 293 | + t.add_build_setting('SWIFT_VERSION', '4.1') |
260 | 294 | elsif xcode_version.start_with?('9.3')
|
261 | 295 | t.add_build_setting('SWIFT_VERSION', '4.1')
|
262 | 296 | elsif xcode_version.start_with?('9')
|
|
0 commit comments