|
@@ -7,7 +7,16 @@ end
|
|
|
|
|
|
def destinations(platform: 'iphonesimulator')
|
|
|
if platform == 'iphonesimulator'
|
|
|
- if xcode_version.start_with?('9.4')
|
|
|
+ if xcode_version.start_with?('10')
|
|
|
+ [ 'name=iPhone 5s,OS=12.0',
|
|
|
+ 'name=iPhone 6,OS=12.0',
|
|
|
+ 'name=iPhone 6s Plus,OS=12.0',
|
|
|
+ 'name=iPhone SE,OS=12.0',
|
|
|
+ 'name=iPad Air 2,OS=12.0',
|
|
|
+ 'name=iPad Pro (9.7-inch),OS=12.0',
|
|
|
+ 'name=iPad Pro (12.9-inch),OS=12.0'
|
|
|
+ ]
|
|
|
+ elsif xcode_version.start_with?('9.4')
|
|
|
[ 'name=iPhone 5s,OS=11.4',
|
|
|
'name=iPhone 6,OS=11.4',
|
|
|
'name=iPhone 6s Plus,OS=11.4',
|
|
@@ -70,7 +79,11 @@ def destinations(platform: 'iphonesimulator')
|
|
|
]
|
|
|
end
|
|
|
elsif platform == 'watchsimulator'
|
|
|
- if xcode_version.start_with?('9.4')
|
|
|
+ if xcode_version.start_with?('10')
|
|
|
+ [ 'name=Apple Watch Series 4 - 40mm,OS=5.0',
|
|
|
+ 'name=Apple Watch Series 4 - 44mm,OS=5.0'
|
|
|
+ ]
|
|
|
+ elsif xcode_version.start_with?('9.4')
|
|
|
[ 'name=Apple Watch Series 3 - 38mm,OS=4.3',
|
|
|
'name=Apple Watch Series 3 - 42mm,OS=4.3'
|
|
|
]
|
|
@@ -100,7 +113,10 @@ def destinations(platform: 'iphonesimulator')
|
|
|
]
|
|
|
end
|
|
|
elsif platform == 'appletvsimulator'
|
|
|
- if xcode_version.start_with?('9.4')
|
|
|
+ if xcode_version.start_with?('10')
|
|
|
+ [ 'name=Apple TV 4K,OS=12.0'
|
|
|
+ ]
|
|
|
+ elsif xcode_version.start_with?('9.4')
|
|
|
[ 'name=Apple TV 4K,OS=11.4'
|
|
|
]
|
|
|
elsif xcode_version.start_with?('9.3')
|
|
@@ -157,7 +173,16 @@ namespace :build do
|
|
|
t.add_build_setting('CODE_SIGN_IDENTITY', '')
|
|
|
t.add_build_setting('CODE_SIGNING_REQUIRED', 'NO')
|
|
|
end
|
|
|
- if xcode_version.start_with?('9.4')
|
|
|
+ if xcode_version.start_with?('10')
|
|
|
+ t.add_build_setting('SWIFT_VERSION', '4.2')
|
|
|
+ if platform == 'iphonesimulator'
|
|
|
+ t.add_destination('name=iPhone 7,OS=12.0')
|
|
|
+ elsif platform == 'watchsimulator'
|
|
|
+ t.add_destination('name=Apple Watch Series 4 - 44mm,OS=5.0')
|
|
|
+ elsif platform == 'appletvsimulator'
|
|
|
+ t.add_destination('name=Apple TV 4K,OS=12.0')
|
|
|
+ end
|
|
|
+ elsif xcode_version.start_with?('9.4')
|
|
|
t.add_build_setting('SWIFT_VERSION', '4.1')
|
|
|
if platform == 'iphonesimulator'
|
|
|
t.add_destination('name=iPhone 7,OS=11.4')
|
|
@@ -217,12 +242,19 @@ namespace :build do
|
|
|
|
|
|
task :carthage do
|
|
|
sh %[echo 'github \"kishikawakatsumi/KeychainAccess\"' > Cartfile]
|
|
|
- if xcode_version.start_with?('8')
|
|
|
- sh %[echo SWIFT_VERSION=\"3.0\" > swift3.xcconfig]
|
|
|
- sh %[XCODE_XCCONFIG_FILE=`pwd`/swift3.xcconfig carthage update --no-use-binaries]
|
|
|
+ if xcode_version.start_with?('10')
|
|
|
+ sh %[echo SWIFT_VERSION=\"4.2\" > swift.xcconfig]
|
|
|
+ elsif xcode_version.start_with?('9.4')
|
|
|
+ sh %[echo SWIFT_VERSION=\"4.1\" > swift.xcconfig]
|
|
|
+ elsif xcode_version.start_with?('9.3')
|
|
|
+ sh %[echo SWIFT_VERSION=\"4.1\" > swift.xcconfig]
|
|
|
+ elsif xcode_version.start_with?('9')
|
|
|
+ sh %[echo SWIFT_VERSION=\"4.0\" > swift.xcconfig]
|
|
|
else
|
|
|
- sh %[carthage update --no-use-binaries]
|
|
|
+ sh %[echo SWIFT_VERSION=\"3.0\" > swift.xcconfig]
|
|
|
end
|
|
|
+ sh %[XCODE_XCCONFIG_FILE=`pwd`/swift.xcconfig carthage update --no-use-binaries]
|
|
|
+ sh %[find . -name '*.bcsymbolmap' | xargs grep swiftlang]
|
|
|
end
|
|
|
end
|
|
|
|
|
@@ -255,8 +287,10 @@ namespace :test do
|
|
|
t.coverage = true
|
|
|
t.build_dir = 'build'
|
|
|
t.hide_shell_script_environment = true
|
|
|
- if xcode_version.start_with?('9.4')
|
|
|
+ if xcode_version.start_with?('10')
|
|
|
t.add_build_setting('SWIFT_VERSION', '4.2')
|
|
|
+ elsif xcode_version.start_with?('9.4')
|
|
|
+ t.add_build_setting('SWIFT_VERSION', '4.1')
|
|
|
elsif xcode_version.start_with?('9.3')
|
|
|
t.add_build_setting('SWIFT_VERSION', '4.1')
|
|
|
elsif xcode_version.start_with?('9')
|