fastlane 2.138.0 → 2.143.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +75 -62
  4. data/cert/lib/cert/options.rb +12 -5
  5. data/cert/lib/cert/runner.rb +13 -0
  6. data/deliver/lib/deliver/options.rb +2 -2
  7. data/deliver/lib/deliver/runner.rb +13 -2
  8. data/deliver/lib/deliver/submit_for_review.rb +7 -1
  9. data/fastlane/lib/fastlane/action.rb +2 -2
  10. data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
  11. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  12. data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
  13. data/fastlane/lib/fastlane/actions/README.md +2 -0
  14. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +13 -5
  15. data/fastlane/lib/fastlane/actions/build_app.rb +157 -6
  16. data/fastlane/lib/fastlane/actions/build_ios_app.rb +28 -132
  17. data/fastlane/lib/fastlane/actions/build_mac_app.rb +46 -0
  18. data/fastlane/lib/fastlane/actions/cocoapods.rb +2 -2
  19. data/fastlane/lib/fastlane/actions/create_pull_request.rb +71 -2
  20. data/fastlane/lib/fastlane/actions/docs/{build_ios_app.md → build_app.md} +1 -1
  21. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +22 -6
  22. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +20 -4
  23. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +10 -0
  24. data/fastlane/lib/fastlane/actions/ensure_git_branch.rb +1 -1
  25. data/fastlane/lib/fastlane/actions/ensure_xcode_version.rb +35 -7
  26. data/fastlane/lib/fastlane/actions/frame_screenshots.rb +2 -1
  27. data/fastlane/lib/fastlane/actions/get_github_release.rb +3 -0
  28. data/fastlane/lib/fastlane/actions/gradle.rb +43 -2
  29. data/fastlane/lib/fastlane/actions/gym.rb +3 -7
  30. data/fastlane/lib/fastlane/actions/import_from_git.rb +4 -0
  31. data/fastlane/lib/fastlane/actions/last_git_tag.rb +14 -5
  32. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +9 -3
  33. data/fastlane/lib/fastlane/actions/notarize.rb +183 -0
  34. data/fastlane/lib/fastlane/actions/run_tests.rb +5 -22
  35. data/fastlane/lib/fastlane/actions/s3.rb +5 -291
  36. data/fastlane/lib/fastlane/actions/set_github_release.rb +1 -1
  37. data/fastlane/lib/fastlane/actions/setup_ci.rb +14 -8
  38. data/fastlane/lib/fastlane/actions/spm.rb +8 -0
  39. data/fastlane/lib/fastlane/actions/swiftlint.rb +17 -2
  40. data/fastlane/lib/fastlane/actions/update_plist.rb +37 -2
  41. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +13 -3
  42. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -0
  43. data/fastlane/lib/fastlane/actions/upload_to_play_store_internal_app_sharing.rb +78 -0
  44. data/fastlane/lib/fastlane/fast_file.rb +13 -3
  45. data/fastlane/lib/fastlane/helper/adb_helper.rb +1 -1
  46. data/fastlane/lib/fastlane/helper/s3_client_helper.rb +56 -0
  47. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
  48. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +2 -0
  49. data/fastlane/lib/fastlane/runner.rb +23 -18
  50. data/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb +1 -1
  51. data/fastlane/lib/fastlane/version.rb +1 -1
  52. data/fastlane/swift/Deliverfile.swift +1 -1
  53. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  54. data/fastlane/swift/Fastlane.swift +429 -50
  55. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  56. data/fastlane/swift/Gymfile.swift +1 -1
  57. data/fastlane/swift/GymfileProtocol.swift +17 -1
  58. data/fastlane/swift/Matchfile.swift +1 -1
  59. data/fastlane/swift/MatchfileProtocol.swift +23 -3
  60. data/fastlane/swift/Precheckfile.swift +1 -1
  61. data/fastlane/swift/RubyCommand.swift +1 -1
  62. data/fastlane/swift/Scanfile.swift +1 -1
  63. data/fastlane/swift/ScanfileProtocol.swift +21 -1
  64. data/fastlane/swift/Screengrabfile.swift +1 -1
  65. data/fastlane/swift/Snapshotfile.swift +1 -1
  66. data/fastlane/swift/SnapshotfileProtocol.swift +9 -1
  67. data/fastlane_core/lib/fastlane_core/build_watcher.rb +6 -2
  68. data/fastlane_core/lib/fastlane_core/cert_checker.rb +28 -0
  69. data/fastlane_core/lib/fastlane_core/device_manager.rb +20 -0
  70. data/fastlane_core/lib/fastlane_core/helper.rb +7 -1
  71. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +1 -0
  72. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +2 -0
  73. data/fastlane_core/lib/fastlane_core/project.rb +27 -0
  74. data/frameit/lib/frameit/commands_generator.rb +25 -0
  75. data/frameit/lib/frameit/config_parser.rb +31 -9
  76. data/frameit/lib/frameit/device.rb +90 -0
  77. data/frameit/lib/frameit/device_types.rb +121 -5
  78. data/frameit/lib/frameit/editor.rb +31 -40
  79. data/frameit/lib/frameit/offsets.rb +8 -1
  80. data/frameit/lib/frameit/options.rb +81 -54
  81. data/frameit/lib/frameit/runner.rb +17 -7
  82. data/frameit/lib/frameit/screenshot.rb +35 -47
  83. data/frameit/lib/frameit/template_finder.rb +15 -12
  84. data/gym/lib/gym/code_signing_mapping.rb +32 -3
  85. data/gym/lib/gym/detect_values.rb +34 -2
  86. data/gym/lib/gym/generators/build_command_generator.rb +1 -0
  87. data/gym/lib/gym/generators/package_command_generator.rb +4 -0
  88. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +47 -17
  89. data/gym/lib/gym/module.rb +8 -0
  90. data/gym/lib/gym/options.rb +25 -1
  91. data/gym/lib/gym/runner.rb +64 -24
  92. data/match/lib/match/change_password.rb +1 -1
  93. data/match/lib/match/encryption.rb +4 -0
  94. data/match/lib/match/encryption/openssl.rb +1 -1
  95. data/match/lib/match/generator.rb +17 -3
  96. data/match/lib/match/importer.rb +2 -2
  97. data/match/lib/match/module.rb +5 -2
  98. data/match/lib/match/nuke.rb +59 -17
  99. data/match/lib/match/options.rb +38 -15
  100. data/match/lib/match/runner.rb +24 -8
  101. data/match/lib/match/setup.rb +1 -1
  102. data/match/lib/match/spaceship_ensure.rb +19 -9
  103. data/match/lib/match/storage.rb +4 -0
  104. data/match/lib/match/storage/git_storage.rb +5 -2
  105. data/match/lib/match/storage/google_cloud_storage.rb +2 -2
  106. data/match/lib/match/storage/s3_storage.rb +162 -0
  107. data/pilot/lib/pilot/.manager.rb.swp +0 -0
  108. data/pilot/lib/pilot/build_manager.rb +55 -15
  109. data/pilot/lib/pilot/options.rb +3 -1
  110. data/scan/lib/scan/detect_values.rb +6 -1
  111. data/scan/lib/scan/manager.rb +18 -1
  112. data/scan/lib/scan/options.rb +28 -1
  113. data/scan/lib/scan/runner.rb +11 -3
  114. data/scan/lib/scan/slack_poster.rb +1 -1
  115. data/scan/lib/scan/test_command_generator.rb +9 -5
  116. data/screengrab/lib/screengrab/runner.rb +31 -18
  117. data/snapshot/lib/snapshot/fixes/simulator_shared_pasteboard.rb +16 -0
  118. data/snapshot/lib/snapshot/options.rb +12 -1
  119. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  120. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +13 -0
  121. data/spaceship/lib/spaceship/connect_api/.DS_Store +0 -0
  122. data/spaceship/lib/spaceship/connect_api/models/beta_feedback.rb +4 -0
  123. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
  124. data/spaceship/lib/spaceship/connect_api/models/build_beta_detail.rb +5 -0
  125. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +2 -0
  126. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +6 -0
  127. data/spaceship/lib/spaceship/portal/.certificate.rb.swp +0 -0
  128. data/spaceship/lib/spaceship/portal/app.rb +11 -2
  129. data/spaceship/lib/spaceship/tunes/iap.rb +11 -11
  130. data/spaceship/lib/spaceship/tunes/iap_detail.rb +7 -3
  131. data/spaceship/lib/spaceship/tunes/iap_families.rb +12 -1
  132. data/spaceship/lib/spaceship/tunes/iap_family_details.rb +26 -17
  133. data/spaceship/lib/spaceship/tunes/iap_status.rb +5 -1
  134. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  135. data/supply/lib/supply/client.rb +26 -0
  136. data/supply/lib/supply/uploader.rb +28 -0
  137. metadata +64 -20
@@ -18,4 +18,4 @@ class Gymfile: GymfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.138.0
21
+ // Generated with fastlane 2.143.0
@@ -30,6 +30,9 @@ protocol GymfileProtocol: class {
30
30
  /// Should we skip packaging the ipa?
31
31
  var skipPackageIpa: Bool { get }
32
32
 
33
+ /// Should we skip packaging the pkg?
34
+ var skipPackagePkg: Bool { get }
35
+
33
36
  /// Should the ipa file include symbols?
34
37
  var includeSymbols: Bool? { get }
35
38
 
@@ -54,6 +57,12 @@ protocol GymfileProtocol: class {
54
57
  /// Build without codesigning
55
58
  var skipCodesigning: Bool? { get }
56
59
 
60
+ /// Platform to build when using a Catalyst enabled app. Valid values are: ios, macos
61
+ var catalystPlatform: String? { get }
62
+
63
+ /// Full name of 3rd Party Mac Developer Installer or Deveoper ID Installer certificate. Example: `3rd Party Mac Developer Installer: Your Company (ABC1234XWYZ)`
64
+ var installerCertName: String? { get }
65
+
57
66
  /// The directory in which the archive should be stored in
58
67
  var buildPath: String? { get }
59
68
 
@@ -119,6 +128,9 @@ protocol GymfileProtocol: class {
119
128
 
120
129
  /// Do not try to build a profile mapping from the xcodeproj. Match or a manually provided mapping should be used
121
130
  var skipProfileDetection: Bool { get }
131
+
132
+ /// Sets a custom path for Swift Package Manager dependencies
133
+ var clonedSourcePackagesPath: String? { get }
122
134
  }
123
135
 
124
136
  extension GymfileProtocol {
@@ -132,6 +144,7 @@ extension GymfileProtocol {
132
144
  var silent: Bool { return false }
133
145
  var codesigningIdentity: String? { return nil }
134
146
  var skipPackageIpa: Bool { return false }
147
+ var skipPackagePkg: Bool { return false }
135
148
  var includeSymbols: Bool? { return nil }
136
149
  var includeBitcode: Bool? { return nil }
137
150
  var exportMethod: String? { return nil }
@@ -140,6 +153,8 @@ extension GymfileProtocol {
140
153
  var skipBuildArchive: Bool? { return nil }
141
154
  var skipArchive: Bool? { return nil }
142
155
  var skipCodesigning: Bool? { return nil }
156
+ var catalystPlatform: String? { return nil }
157
+ var installerCertName: String? { return nil }
143
158
  var buildPath: String? { return nil }
144
159
  var archivePath: String? { return nil }
145
160
  var derivedDataPath: String? { return nil }
@@ -162,8 +177,9 @@ extension GymfileProtocol {
162
177
  var analyzeBuildTime: Bool? { return nil }
163
178
  var xcprettyUtf: Bool? { return nil }
164
179
  var skipProfileDetection: Bool { return false }
180
+ var clonedSourcePackagesPath: String? { return nil }
165
181
  }
166
182
 
167
183
  // Please don't remove the lines below
168
184
  // They are used to detect outdated files
169
- // FastlaneRunnerAPIVersion [0.9.17]
185
+ // FastlaneRunnerAPIVersion [0.9.18]
@@ -18,4 +18,4 @@ class Matchfile: MatchfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.138.0
21
+ // Generated with fastlane 2.143.0
@@ -1,8 +1,11 @@
1
1
  protocol MatchfileProtocol: class {
2
2
 
3
- /// Define the profile type, can be appstore, adhoc, development, enterprise
3
+ /// Define the profile type, can be appstore, adhoc, development, enterprise, developer_id
4
4
  var type: String { get }
5
5
 
6
+ /// Create additional cert types needed for macOS installers (valid values: mac_installer_distribution, developer_id_installer)
7
+ var additionalCertTypes: [String]? { get }
8
+
6
9
  /// Only fetch existing certificates and profiles, don't generate new ones
7
10
  var readonly: Bool { get }
8
11
 
@@ -60,6 +63,18 @@ protocol MatchfileProtocol: class {
60
63
  /// ID of the Google Cloud project to use for authentication
61
64
  var googleCloudProjectId: String? { get }
62
65
 
66
+ /// Name of the S3 region
67
+ var s3Region: String? { get }
68
+
69
+ /// S3 access key
70
+ var s3AccessKey: String? { get }
71
+
72
+ /// S3 secret secret access key
73
+ var s3SecretAccessKey: String? { get }
74
+
75
+ /// Name of the S3 bucket
76
+ var s3Bucket: String? { get }
77
+
63
78
  /// Keychain the items should be imported to
64
79
  var keychainName: String { get }
65
80
 
@@ -78,7 +93,7 @@ protocol MatchfileProtocol: class {
78
93
  /// Skip generation of a README.md for the created git repository
79
94
  var skipDocs: Bool { get }
80
95
 
81
- /// Set the provisioning profile's platform to work with (i.e. ios, tvos)
96
+ /// Set the provisioning profile's platform to work with (i.e. ios, tvos, macos)
82
97
  var platform: String { get }
83
98
 
84
99
  /// The name of provisioning profile template. If the developer account has provisioning profile templates (aka: custom entitlements), the template name can be found by inspecting the Entitlements drop-down while creating/editing a provisioning profile (e.g. "Apple Pay Pass Suppression Development")
@@ -93,6 +108,7 @@ protocol MatchfileProtocol: class {
93
108
 
94
109
  extension MatchfileProtocol {
95
110
  var type: String { return "development" }
111
+ var additionalCertTypes: [String]? { return nil }
96
112
  var readonly: Bool { return false }
97
113
  var generateAppleCerts: Bool { return true }
98
114
  var skipProvisioningProfiles: Bool { return false }
@@ -112,6 +128,10 @@ extension MatchfileProtocol {
112
128
  var googleCloudBucketName: String? { return nil }
113
129
  var googleCloudKeysFile: String? { return nil }
114
130
  var googleCloudProjectId: String? { return nil }
131
+ var s3Region: String? { return nil }
132
+ var s3AccessKey: String? { return nil }
133
+ var s3SecretAccessKey: String? { return nil }
134
+ var s3Bucket: String? { return nil }
115
135
  var keychainName: String { return "login.keychain" }
116
136
  var keychainPassword: String? { return nil }
117
137
  var force: Bool { return false }
@@ -126,4 +146,4 @@ extension MatchfileProtocol {
126
146
 
127
147
  // Please don't remove the lines below
128
148
  // They are used to detect outdated files
129
- // FastlaneRunnerAPIVersion [0.9.12]
149
+ // FastlaneRunnerAPIVersion [0.9.14]
@@ -18,4 +18,4 @@ class Precheckfile: PrecheckfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.138.0
21
+ // Generated with fastlane 2.143.0
@@ -49,7 +49,7 @@ struct RubyCommand: RubyCommandable {
49
49
  let typeJson: String
50
50
  if let type = type {
51
51
  typeJson = ", \"value_type\" : \"\(type.typeString)\""
52
- }else {
52
+ } else {
53
53
  typeJson = ""
54
54
  }
55
55
 
@@ -18,4 +18,4 @@ class Scanfile: ScanfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.138.0
21
+ // Generated with fastlane 2.143.0
@@ -24,6 +24,9 @@ protocol ScanfileProtocol: class {
24
24
  /// Enabling this option will automatically erase the simulator before running the application
25
25
  var resetSimulator: Bool { get }
26
26
 
27
+ /// Enabling this option will disable the simulator from showing the 'Slide to type' prompt
28
+ var disableSlideToType: Bool { get }
29
+
27
30
  /// Enabling this option will launch the first simulator prior to calling any xcodebuild command
28
31
  var prelaunchSimulator: Bool? { get }
29
32
 
@@ -99,6 +102,9 @@ protocol ScanfileProtocol: class {
99
102
  /// Generate the json compilation database with clang naming convention (compile_commands.json)
100
103
  var useClangReportName: Bool { get }
101
104
 
105
+ /// Specify the exact number of test runners that will be spawned during parallel testing. Equivalent to -parallel-testing-worker-count
106
+ var concurrentWorkers: Int? { get }
107
+
102
108
  /// Constrain the number of simulator devices on which to test concurrently. Equivalent to -maximum-concurrent-test-simulator-destinations
103
109
  var maxConcurrentSimulators: Int? { get }
104
110
 
@@ -126,6 +132,12 @@ protocol ScanfileProtocol: class {
126
132
  /// Use an extra XCCONFIG file to build your app
127
133
  var xcconfig: String? { get }
128
134
 
135
+ /// App name to use in slack message and logfile name
136
+ var appName: String? { get }
137
+
138
+ /// Target version of the app being build or tested. Used to filter out simulator version
139
+ var deploymentTargetVersion: String? { get }
140
+
129
141
  /// Create an Incoming WebHook for your Slack group to post results there
130
142
  var slackUrl: String? { get }
131
143
 
@@ -159,6 +171,9 @@ protocol ScanfileProtocol: class {
159
171
  /// Allows for override of the default `xcodebuild` command
160
172
  var xcodebuildCommand: String { get }
161
173
 
174
+ /// Sets a custom path for Swift Package Manager dependencies
175
+ var clonedSourcePackagesPath: String? { get }
176
+
162
177
  /// Should this step stop the build if the tests fail? Set this to false if you're using trainer
163
178
  var failBuild: Bool { get }
164
179
  }
@@ -172,6 +187,7 @@ extension ScanfileProtocol {
172
187
  var skipDetectDevices: Bool { return false }
173
188
  var forceQuitSimulator: Bool { return false }
174
189
  var resetSimulator: Bool { return false }
190
+ var disableSlideToType: Bool { return true }
175
191
  var prelaunchSimulator: Bool? { return nil }
176
192
  var reinstallApp: Bool { return false }
177
193
  var appIdentifier: String? { return nil }
@@ -197,6 +213,7 @@ extension ScanfileProtocol {
197
213
  var shouldZipBuildProducts: Bool { return false }
198
214
  var resultBundle: Bool { return false }
199
215
  var useClangReportName: Bool { return false }
216
+ var concurrentWorkers: Int? { return nil }
200
217
  var maxConcurrentSimulators: Int? { return nil }
201
218
  var disableConcurrentTesting: Bool { return false }
202
219
  var skipBuild: Bool { return false }
@@ -206,6 +223,8 @@ extension ScanfileProtocol {
206
223
  var configuration: String? { return nil }
207
224
  var xcargs: String? { return nil }
208
225
  var xcconfig: String? { return nil }
226
+ var appName: String? { return nil }
227
+ var deploymentTargetVersion: String? { return nil }
209
228
  var slackUrl: String? { return nil }
210
229
  var slackChannel: String? { return nil }
211
230
  var slackMessage: String? { return nil }
@@ -217,9 +236,10 @@ extension ScanfileProtocol {
217
236
  var destination: String? { return nil }
218
237
  var customReportFileName: String? { return nil }
219
238
  var xcodebuildCommand: String { return "env NSUnbufferedIO=YES xcodebuild" }
239
+ var clonedSourcePackagesPath: String? { return nil }
220
240
  var failBuild: Bool { return true }
221
241
  }
222
242
 
223
243
  // Please don't remove the lines below
224
244
  // They are used to detect outdated files
225
- // FastlaneRunnerAPIVersion [0.9.22]
245
+ // FastlaneRunnerAPIVersion [0.9.26]
@@ -18,4 +18,4 @@ class Screengrabfile: ScreengrabfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.138.0
21
+ // Generated with fastlane 2.143.0
@@ -18,4 +18,4 @@ class Snapshotfile: SnapshotfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.138.0
21
+ // Generated with fastlane 2.143.0
@@ -101,6 +101,12 @@ protocol SnapshotfileProtocol: class {
101
101
 
102
102
  /// Take snapshots on multiple simulators concurrently. Note: This option is only applicable when running against Xcode 9
103
103
  var concurrentSimulators: Bool { get }
104
+
105
+ /// Disable the simulator from showing the 'Slide to type' prompt
106
+ var disableSlideToType: Bool { get }
107
+
108
+ /// Sets a custom path for Swift Package Manager dependencies
109
+ var clonedSourcePackagesPath: String? { get }
104
110
  }
105
111
 
106
112
  extension SnapshotfileProtocol {
@@ -138,8 +144,10 @@ extension SnapshotfileProtocol {
138
144
  var testTargetName: String? { return nil }
139
145
  var namespaceLogFiles: String? { return nil }
140
146
  var concurrentSimulators: Bool { return true }
147
+ var disableSlideToType: Bool { return false }
148
+ var clonedSourcePackagesPath: String? { return nil }
141
149
  }
142
150
 
143
151
  // Please don't remove the lines below
144
152
  // They are used to detect outdated files
145
- // FastlaneRunnerAPIVersion [0.9.6]
153
+ // FastlaneRunnerAPIVersion [0.9.7]
@@ -6,7 +6,7 @@ module FastlaneCore
6
6
  class BuildWatcher
7
7
  class << self
8
8
  # @return The build we waited for. This method will always return a build
9
- def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false, return_spaceship_testflight_build: true)
9
+ def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true)
10
10
  # Warn about train_version being removed in the future
11
11
  if train_version
12
12
  UI.deprecated(":train_version is no longer a used argument on FastlaneCore::BuildWatcher. Please use :app_version instead.")
@@ -32,7 +32,11 @@ module FastlaneCore
32
32
 
33
33
  report_status(build: matched_build)
34
34
 
35
- if matched_build && matched_build.processed?
35
+ # Processing of builds by AppStoreConnect can be a very time consuming task and will
36
+ # block the worker running this task until it is completed. In some cases,
37
+ # having a build resource appear in AppStoreConnect (matched_build) may be enough (i.e. setting a changelog)
38
+ # so here we may choose to skip the full processing of the build if return_when_build_appears is true
39
+ if matched_build && (return_when_build_appears || matched_build.processed?)
36
40
  if return_spaceship_testflight_build
37
41
  return matched_build.to_testflight_build
38
42
  else
@@ -10,6 +10,7 @@ module FastlaneCore
10
10
  UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
11
11
 
12
12
  ids = installed_identies(in_keychain: in_keychain)
13
+ ids += installed_installers(in_keychain: in_keychain)
13
14
  finger_print = sha1_fingerprint(path)
14
15
 
15
16
  return ids.include?(finger_print)
@@ -47,12 +48,39 @@ module FastlaneCore
47
48
  return ids
48
49
  end
49
50
 
51
+ def self.installed_installers(in_keychain: nil)
52
+ available = self.list_available_third_party_mac_installer(in_keychain: in_keychain)
53
+ available += self.list_available_developer_id_installer(in_keychain: in_keychain)
54
+
55
+ return available.scan(/^SHA-1 hash: ([[:xdigit:]]+)$/).flatten
56
+ end
57
+
50
58
  def self.list_available_identities(in_keychain: nil)
59
+ # -v Show valid identities only (default is to show all identities)
60
+ # -p Specify policy to evaluate
51
61
  commands = ['security find-identity -v -p codesigning']
52
62
  commands << in_keychain if in_keychain
53
63
  `#{commands.join(' ')}`
54
64
  end
55
65
 
66
+ def self.list_available_third_party_mac_installer(in_keychain: nil)
67
+ # -Z Print SHA-256 (and SHA-1) hash of the certificate
68
+ # -a Find all matching certificates, not just the first one
69
+ # -c Match on "name" when searching (optional)
70
+ commands = ['security find-certificate -Z -a -c "3rd Party Mac Developer Installer"']
71
+ commands << in_keychain if in_keychain
72
+ `#{commands.join(' ')}`
73
+ end
74
+
75
+ def self.list_available_developer_id_installer(in_keychain: nil)
76
+ # -Z Print SHA-256 (and SHA-1) hash of the certificate
77
+ # -a Find all matching certificates, not just the first one
78
+ # -c Match on "name" when searching (optional)
79
+ commands = ['security find-certificate -Z -a -c "Developer ID Installer"']
80
+ commands << in_keychain if in_keychain
81
+ `#{commands.join(' ')}`
82
+ end
83
+
56
84
  def self.wwdr_certificate_installed?
57
85
  certificate_name = "Apple Worldwide Developer Relations Certification Authority"
58
86
  keychain = wwdr_keychain
@@ -212,6 +212,19 @@ module FastlaneCore
212
212
  `xcrun simctl delete #{self.udid}`
213
213
  return
214
214
  end
215
+
216
+ def disable_slide_to_type
217
+ return unless is_simulator
218
+ return unless os_type == "iOS"
219
+ return unless Gem::Version.new(os_version) >= Gem::Version.new('13.0')
220
+ UI.message("Disabling 'Slide to Type' #{self}")
221
+
222
+ plist_buddy = '/usr/libexec/PlistBuddy'
223
+ plist_buddy_cmd = "-c \"Add :KeyboardContinuousPathEnabled bool false\""
224
+ plist_path = File.expand_path("~/Library/Developer/CoreSimulator/Devices/#{self.udid}/data/Library/Preferences/com.apple.keyboard.ContinuousPath.plist")
225
+
226
+ Helper.backticks("#{plist_buddy} #{plist_buddy_cmd} #{plist_path}")
227
+ end
215
228
  end
216
229
  end
217
230
 
@@ -248,6 +261,13 @@ module FastlaneCore
248
261
  all.select { |device| device.os_version == os_version }.each(&:delete)
249
262
  end
250
263
 
264
+ # Disable 'Slide to Type' by UDID or name and OS version
265
+ # Latter is useful when combined with -destination option of xcodebuild
266
+ def disable_slide_to_type(udid: nil, name: nil, os_version: nil)
267
+ match = all.detect { |device| device.udid == udid || device.name == name && device.os_version == os_version }
268
+ match.disable_slide_to_type if match
269
+ end
270
+
251
271
  def clear_cache
252
272
  @devices = nil
253
273
  end
@@ -71,13 +71,19 @@ module FastlaneCore
71
71
 
72
72
  # @return [boolean] true if building in a known CI environment
73
73
  def self.ci?
74
+ return true if self.is_circle_ci?
75
+
74
76
  # Check for Jenkins, Travis CI, ... environment variables
75
- ['JENKINS_HOME', 'JENKINS_URL', 'TRAVIS', 'CIRCLECI', 'CI', 'APPCENTER_BUILD_ID', 'TEAMCITY_VERSION', 'GO_PIPELINE_NAME', 'bamboo_buildKey', 'GITLAB_CI', 'XCS', 'TF_BUILD', 'GITHUB_ACTION', 'GITHUB_ACTIONS', 'BITRISE_IO'].each do |current|
77
+ ['JENKINS_HOME', 'JENKINS_URL', 'TRAVIS', 'CI', 'APPCENTER_BUILD_ID', 'TEAMCITY_VERSION', 'GO_PIPELINE_NAME', 'bamboo_buildKey', 'GITLAB_CI', 'XCS', 'TF_BUILD', 'GITHUB_ACTION', 'GITHUB_ACTIONS', 'BITRISE_IO'].each do |current|
76
78
  return true if ENV.key?(current)
77
79
  end
78
80
  return false
79
81
  end
80
82
 
83
+ def self.is_circle_ci?
84
+ return ENV.key?('CIRCLECI')
85
+ end
86
+
81
87
  def self.operating_system
82
88
  return "macOS" if RUBY_PLATFORM.downcase.include?("darwin")
83
89
  return "Windows" if RUBY_PLATFORM.downcase.include?("mswin")
@@ -37,6 +37,7 @@ module FastlaneCore
37
37
 
38
38
  def self.fetch_info_plist_file(path)
39
39
  UI.user_error!("Could not find file at path '#{path}'") unless File.exist?(path)
40
+ Zip.validate_entry_sizes = true # https://github.com/rubyzip/rubyzip/releases/tag/v2.0.0
40
41
  Zip::File.open(path, "rb") do |zipfile|
41
42
  file = zipfile.glob('**/Payload/*.app/Info.plist').first
42
43
  return nil unless file
@@ -10,6 +10,7 @@ module FastlaneCore
10
10
  command << " -P #{certificate_password.shellescape}"
11
11
  command << " -T /usr/bin/codesign" # to not be asked for permission when running a tool like `gym` (before Sierra)
12
12
  command << " -T /usr/bin/security"
13
+ command << " -T /usr/bin/productbuild" # to not be asked for permission when using an installer cert for macOS
13
14
  command << " 1> /dev/null" unless output
14
15
 
15
16
  UI.command(command) if output
@@ -37,6 +38,7 @@ module FastlaneCore
37
38
  if Helper.backticks('security -h | grep set-key-partition-list', print: false).length > 0
38
39
  command = "security set-key-partition-list"
39
40
  command << " -S apple-tool:,apple:"
41
+ command << " -s" # This is a needed in Catalina to prevent "security: SecKeychainItemCopyAccess: A missing value was detected."
40
42
  command << " -k #{keychain_password.to_s.shellescape}"
41
43
  command << " #{keychain_path.shellescape}"
42
44
  command << " 1> /dev/null" # always disable stdout. This can be very verbose, and leak potentially sensitive info
@@ -1,5 +1,6 @@
1
1
  require_relative 'helper'
2
2
  require 'xcodeproj'
3
+ require 'fastlane_core/command_executor'
3
4
 
4
5
  module FastlaneCore
5
6
  # Represents an Xcode project
@@ -273,6 +274,10 @@ module FastlaneCore
273
274
  (framework? && build_settings(key: "PLATFORM_NAME") == "macosx")
274
275
  end
275
276
 
277
+ def supports_mac_catalyst?
278
+ build_settings(key: "SUPPORTS_MACCATALYST") == "YES"
279
+ end
280
+
276
281
  def command_line_tool?
277
282
  (build_settings(key: "PRODUCT_TYPE") == "com.apple.product-type.tool")
278
283
  end
@@ -289,6 +294,10 @@ module FastlaneCore
289
294
  supported_platforms.include?(:iOS)
290
295
  end
291
296
 
297
+ def watchos?
298
+ supported_platforms.include?(:watchOS)
299
+ end
300
+
292
301
  def supported_platforms
293
302
  supported_platforms = build_settings(key: "SUPPORTED_PLATFORMS")
294
303
  if supported_platforms.nil?
@@ -313,6 +322,10 @@ module FastlaneCore
313
322
  proj << "-configuration #{options[:configuration].shellescape}" if options[:configuration]
314
323
  proj << "-xcconfig #{options[:xcconfig].shellescape}" if options[:xcconfig]
315
324
 
325
+ if FastlaneCore::Helper.xcode_at_least?('11.0') && options[:cloned_source_packages_path]
326
+ proj << "-clonedSourcePackagesDirPath #{options[:cloned_source_packages_path].shellescape}"
327
+ end
328
+
316
329
  return proj
317
330
  end
318
331
 
@@ -335,6 +348,12 @@ module FastlaneCore
335
348
  command
336
349
  end
337
350
 
351
+ def build_xcodebuild_resolvepackagedependencies_command
352
+ command = "xcodebuild -resolvePackageDependencies #{xcodebuild_parameters.join(' ')}"
353
+ command += " 2> /dev/null" if xcodebuild_suppress_stderr
354
+ command
355
+ end
356
+
338
357
  # Get the build settings for our project
339
358
  # e.g. to properly get the DerivedData folder
340
359
  # @param [String] The key of which we want the value for (e.g. "PRODUCT_NAME")
@@ -347,6 +366,14 @@ module FastlaneCore
347
366
  options[:scheme] ||= schemes.first
348
367
  end
349
368
 
369
+ # SwiftPM support
370
+ if FastlaneCore::Helper.xcode_at_least?('11.0')
371
+ UI.important("Resolving Swift Package Manager dependencies...")
372
+ FastlaneCore::CommandExecutor.execute(command: build_xcodebuild_resolvepackagedependencies_command,
373
+ print_all: true,
374
+ print_command: !self.xcodebuild_list_silent)
375
+ end
376
+
350
377
  command = build_xcodebuild_showbuildsettings_command
351
378
 
352
379
  # Xcode might hang here and retrying fixes the problem, see fastlane#4059