fastlane 2.119.0.beta.20190322200024 → 2.119.0.beta.20190323200019

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32e40d34dcba02ba54da7e540386b796f23c43f4
4
- data.tar.gz: d71ed86556bb104dedc41d7440e6c6844438914c
3
+ metadata.gz: 00f9fa9bd7eb8220d067769a4379a73604cd9034
4
+ data.tar.gz: b94cd6409e2a6c2f5f05fed2401b5b07e4fd5fb1
5
5
  SHA512:
6
- metadata.gz: 286507a7ae15a1e4d80909ada8cac0d942e23ebe438eeb8205e04e48424a6864c3dcbba547d7f941305dd22fd73e675d8f49f74069b471b146df5f47c31802dd
7
- data.tar.gz: a75754be648467ed2186ba62ae8637d198465e2019c4111154a2712cea0cc20a53dd010739cbc893acd90a69a7e3ab08a587e6cca74a35a835feb56ca3b62496
6
+ metadata.gz: 8a4f4f70c1c40a6f597c12fb0c64df16dc0d44c7cd5baebb530796d843b2c73e72e34668ce106b97af20e59f819e32febedd9dca8241a1674d5079657528e33c
7
+ data.tar.gz: d1af8896830579581e945a7c174079f9f4b9eb8863e5ac27cbaac359c8ef0cdbd58479f25e0f88686beb755781709c10a688ec906840769b9534cb2531626ae6
@@ -6,14 +6,15 @@ module Deliver
6
6
  # AppScreenshot represents one screenshots for one specific locale and
7
7
  # device type.
8
8
  class AppScreenshot
9
+ #
9
10
  module ScreenSize
10
11
  # iPhone 4
11
12
  IOS_35 = "iOS-3.5-in"
12
13
  # iPhone 5
13
14
  IOS_40 = "iOS-4-in"
14
- # iPhone 6
15
+ # iPhone 6, 7, & 8
15
16
  IOS_47 = "iOS-4.7-in"
16
- # iPhone 6 Plus
17
+ # iPhone 6 Plus, 7 Plus, & 8 Plus
17
18
  IOS_55 = "iOS-5.5-in"
18
19
  # iPhone XS
19
20
  IOS_58 = "iOS-5.8-in"
@@ -21,6 +22,7 @@ module Deliver
21
22
  IOS_61 = "iOS-6.1-in"
22
23
  # iPhone XS Max
23
24
  IOS_65 = "iOS-6.5-in"
25
+
24
26
  # iPad
25
27
  IOS_IPAD = "iOS-iPad"
26
28
  # iPad 10.5
@@ -29,11 +31,12 @@ module Deliver
29
31
  IOS_IPAD_11 = "iOS-iPad-11"
30
32
  # iPad Pro
31
33
  IOS_IPAD_PRO = "iOS-iPad-Pro"
34
+
32
35
  # iPhone 5 iMessage
33
36
  IOS_40_MESSAGES = "iOS-4-in-messages"
34
- # iPhone 6 iMessage
37
+ # iPhone 6, 7, & 8 iMessage
35
38
  IOS_47_MESSAGES = "iOS-4.7-in-messages"
36
- # iPhone 6 Plus iMessage
39
+ # iPhone 6 Plus, 7 Plus, & 8 Plus iMessage
37
40
  IOS_55_MESSAGES = "iOS-5.5-in-messages"
38
41
  # iPhone XS iMessage
39
42
  IOS_58_MESSAGES = "iOS-5.8-in-messages"
@@ -41,6 +44,7 @@ module Deliver
41
44
  IOS_61_MESSAGES = "iOS-6.1-in-messages"
42
45
  # iPhone XS Max iMessage
43
46
  IOS_65_MESSAGES = "iOS-6.5-in-messages"
47
+
44
48
  # iPad iMessage
45
49
  IOS_IPAD_MESSAGES = "iOS-iPad-messages"
46
50
  # iPad 10.5 iMessage
@@ -49,14 +53,17 @@ module Deliver
49
53
  IOS_IPAD_11_MESSAGES = "iOS-11-messages"
50
54
  # iPad Pro iMessage
51
55
  IOS_IPAD_PRO_MESSAGES = "iOS-iPad-Pro-messages"
56
+
52
57
  # Apple Watch
53
58
  IOS_APPLE_WATCH = "iOS-Apple-Watch"
54
59
  # Apple Watch Series 4
55
60
  IOS_APPLE_WATCH_SERIES4 = "iOS-Apple-Watch-Series4"
56
- # Mac
57
- MAC = "Mac"
61
+
58
62
  # Apple TV
59
63
  APPLE_TV = "Apple-TV"
64
+
65
+ # Mac
66
+ MAC = "Mac"
60
67
  end
61
68
 
62
69
  # @return [Deliver::ScreenSize] the screen size (device type)
@@ -68,7 +75,7 @@ module Deliver
68
75
  attr_accessor :language
69
76
 
70
77
  # @param path (String) path to the screenshot file
71
- # @param path (String) Language of this screenshot (e.g. English)
78
+ # @param language (String) Language of this screenshot (e.g. English)
72
79
  # @param screen_size (Deliver::AppScreenshot::ScreenSize) the screen size, which
73
80
  # will automatically be calculated when you don't set it.
74
81
  def initialize(path, language, screen_size = nil)
@@ -88,8 +95,8 @@ module Deliver
88
95
  matching = {
89
96
  ScreenSize::IOS_35 => "iphone35",
90
97
  ScreenSize::IOS_40 => "iphone4",
91
- ScreenSize::IOS_47 => "iphone6",
92
- ScreenSize::IOS_55 => "iphone6Plus",
98
+ ScreenSize::IOS_47 => "iphone6", # also 7 and 8
99
+ ScreenSize::IOS_55 => "iphone6Plus", # also 7 Plus & 8 Plus
93
100
  ScreenSize::IOS_58 => "iphone58",
94
101
  ScreenSize::IOS_65 => "iphone65",
95
102
  ScreenSize::IOS_IPAD => "ipad",
@@ -97,8 +104,8 @@ module Deliver
97
104
  ScreenSize::IOS_IPAD_11 => "ipadPro11",
98
105
  ScreenSize::IOS_IPAD_PRO => "ipadPro",
99
106
  ScreenSize::IOS_40_MESSAGES => "iphone4",
100
- ScreenSize::IOS_47_MESSAGES => "iphone6",
101
- ScreenSize::IOS_55_MESSAGES => "iphone6Plus",
107
+ ScreenSize::IOS_47_MESSAGES => "iphone6", # also 7 & 8
108
+ ScreenSize::IOS_55_MESSAGES => "iphone6Plus", # also 7 Plus & 8 Plus
102
109
  ScreenSize::IOS_58_MESSAGES => "iphone58",
103
110
  ScreenSize::IOS_65_MESSAGES => "iphone65",
104
111
  ScreenSize::IOS_IPAD_MESSAGES => "ipad",
@@ -120,8 +127,8 @@ module Deliver
120
127
  matching = {
121
128
  ScreenSize::IOS_35 => "iPhone 4",
122
129
  ScreenSize::IOS_40 => "iPhone 5",
123
- ScreenSize::IOS_47 => "iPhone 6",
124
- ScreenSize::IOS_55 => "iPhone 6 Plus",
130
+ ScreenSize::IOS_47 => "iPhone 6", # and 7
131
+ ScreenSize::IOS_55 => "iPhone 6 Plus", # and 7 Plus
125
132
  ScreenSize::IOS_58 => "iPhone XS",
126
133
  ScreenSize::IOS_61 => "iPhone XR",
127
134
  ScreenSize::IOS_65 => "iPhone XS Max",
@@ -130,8 +137,8 @@ module Deliver
130
137
  ScreenSize::IOS_IPAD_11 => "iPad 11",
131
138
  ScreenSize::IOS_IPAD_PRO => "iPad Pro",
132
139
  ScreenSize::IOS_40_MESSAGES => "iPhone 5 (iMessage)",
133
- ScreenSize::IOS_47_MESSAGES => "iPhone 6 (iMessage)",
134
- ScreenSize::IOS_55_MESSAGES => "iPhone 6 Plus (iMessage)",
140
+ ScreenSize::IOS_47_MESSAGES => "iPhone 6 (iMessage)", # also 7 & 8
141
+ ScreenSize::IOS_55_MESSAGES => "iPhone 6 Plus (iMessage)", # also 7 Plus & 8 Plus
135
142
  ScreenSize::IOS_58_MESSAGES => "iPhone XS (iMessage)",
136
143
  ScreenSize::IOS_61_MESSAGES => "iPhone XR (iMessage)",
137
144
  ScreenSize::IOS_65_MESSAGES => "iPhone XS Max (iMessage)",
@@ -243,7 +243,7 @@ module Deliver
243
243
  # rubocop:disable Metrics/LineLength
244
244
  FastlaneCore::ConfigItem.new(key: :itc_provider,
245
245
  env_name: "DELIVER_ITC_PROVIDER",
246
- description: "The provider short name to be used with the iTMSTransporter to identify your team. To get provider short name run `pathToXcode.app/Contents/Applications/Application\\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column",
246
+ description: "The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `pathToXcode.app/Contents/Applications/Application\\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column",
247
247
  optional: true),
248
248
  # rubocop:enable Metrics/LineLength
249
249
 
@@ -156,7 +156,7 @@ module Deliver
156
156
  )
157
157
  end
158
158
 
159
- transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider])
159
+ transporter = transporter_for_selected_team
160
160
  result = transporter.upload(options[:app].apple_id, package_path)
161
161
  UI.user_error!("Could not upload binary to App Store Connect. Check out the error above", show_github_issues: true) unless result
162
162
  end
@@ -174,6 +174,25 @@ module Deliver
174
174
 
175
175
  private
176
176
 
177
+ # If itc_provider was explicitly specified, use it.
178
+ # If there are multiple teams, infer the provider from the selected team name.
179
+ # If there are fewer than two teams, don't infer the provider.
180
+ def transporter_for_selected_team
181
+ generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider])
182
+ return generic_transporter unless options[:itc_provider].nil? && Spaceship::Tunes.client.teams.count > 1
183
+
184
+ begin
185
+ team = Spaceship::Tunes.client.teams.find { |t| t['contentProvider']['contentProviderId'].to_s == Spaceship::Tunes.client.team_id }
186
+ name = team['contentProvider']['name']
187
+ provider_id = generic_transporter.provider_ids[name]
188
+ UI.verbose("Inferred provider id #{provider_id} for team #{name}.")
189
+ return FastlaneCore::ItunesTransporter.new(options[:username], nil, false, provider_id)
190
+ rescue => ex
191
+ UI.verbose("Couldn't infer a provider short name for team with id #{Spaceship::Tunes.client.team_id} automatically: #{ex}. Proceeding without provider short name.")
192
+ return generic_transporter
193
+ end
194
+ end
195
+
177
196
  def validate_html(screenshots)
178
197
  return if options[:force]
179
198
  return if options[:skip_metadata] && options[:skip_screenshots]
@@ -104,9 +104,9 @@ module Deliver
104
104
  files = Dir.glob(File.join(lng_folder, "*.#{extensions}"), File::FNM_CASEFOLD).sort
105
105
  next if files.count == 0
106
106
 
107
- prefer_framed = Dir.glob(File.join(lng_folder, "*_framed.#{extensions}"), File::FNM_CASEFOLD).count > 0
107
+ framed_screenshots_found = Dir.glob(File.join(lng_folder, "*_framed.#{extensions}"), File::FNM_CASEFOLD).count > 0
108
108
 
109
- UI.important("Framed screenshots are detected! 🖼 Non-framed screenshot files may be skipped. 🏃") if prefer_framed
109
+ UI.important("Framed screenshots are detected! 🖼 Non-framed screenshot files may be skipped. 🏃") if framed_screenshots_found
110
110
 
111
111
  language_dir_name = File.basename(lng_folder)
112
112
 
@@ -120,7 +120,7 @@ module Deliver
120
120
  is_framed = file_path.downcase.include?("_framed.")
121
121
  is_watch = file_path.downcase.include?("watch")
122
122
 
123
- if prefer_framed && !is_framed && !is_watch
123
+ if framed_screenshots_found && !is_framed && !is_watch
124
124
  UI.important("🏃 Skipping screenshot file: #{file_path}")
125
125
  next
126
126
  end
@@ -743,3 +743,6 @@ App Store Connect has a limit of 150 binary uploads per day.
743
743
 
744
744
  ## Editing the `Deliverfile`
745
745
  Change syntax highlighting to *Ruby*.
746
+
747
+ ## Provider Short Name
748
+ If you are on multiple App Store Connect teams, _deliver_ needs a provider short name to know where to upload your binary. _deliver_ will try to use the long name of the selected team to detect the provider short name. To override the detected value with an explicit one, use the `itc_provider` option.
@@ -222,3 +222,6 @@ If your password contains special characters, _pilot_ may throw a confusing erro
222
222
  ## How is my password stored?
223
223
 
224
224
  _pilot_ uses the [CredentialsManager](https://github.com/fastlane/fastlane/tree/master/credentials_manager) from _fastlane_.
225
+
226
+ ## Provider Short Name
227
+ If you are on multiple App Store Connect teams, iTunes Transporter may need a provider short name to know where to upload your binary. _pilot_ will try to use the long name of the selected team to detect the provider short name. To override the detected value with an explicit one, use the `itc_provider` option.
@@ -79,7 +79,7 @@ module Fastlane
79
79
  project.save
80
80
 
81
81
  # complete
82
- UI.success("Successfully updated project settings in '#{params[:xcodeproj]}'")
82
+ UI.success("Successfully updated project settings in '#{folder}'")
83
83
  end
84
84
 
85
85
  def self.description
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.119.0.beta.20190322200024'.freeze
2
+ VERSION = '2.119.0.beta.20190323200019'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -31,7 +31,10 @@ module FastlaneCore
31
31
  private_constant :ERROR_REGEX, :WARNING_REGEX, :OUTPUT_REGEX, :RETURN_VALUE_REGEX, :SKIP_ERRORS
32
32
 
33
33
  def execute(command, hide_output)
34
- return command if Helper.test?
34
+ if Helper.test?
35
+ yield(nil) if block_given?
36
+ return command
37
+ end
35
38
 
36
39
  @errors = []
37
40
  @warnings = []
@@ -87,7 +90,8 @@ module FastlaneCore
87
90
  UI.important("Although errors occurred during execution of iTMSTransporter, it returned success status.")
88
91
  end
89
92
 
90
- exit_status.zero?
93
+ yield(@all_lines) if block_given?
94
+ return exit_status.zero?
91
95
  end
92
96
 
93
97
  private
@@ -185,6 +189,15 @@ module FastlaneCore
185
189
  ].compact.join(' ')
186
190
  end
187
191
 
192
+ def build_provider_ids_command(username, password)
193
+ [
194
+ '"' + Helper.transporter_path + '"',
195
+ '-m provider',
196
+ "-u \"#{username}\"",
197
+ "-p #{shell_escaped_password(password)}"
198
+ ].compact.join(' ')
199
+ end
200
+
188
201
  def handle_error(password)
189
202
  # rubocop:disable Style/CaseEquality
190
203
  # rubocop:disable Style/YodaCondition
@@ -270,6 +283,24 @@ module FastlaneCore
270
283
  ].compact.join(' ')
271
284
  end
272
285
 
286
+ def build_provider_ids_command(username, password)
287
+ [
288
+ Helper.transporter_java_executable_path.shellescape,
289
+ "-Djava.ext.dirs=#{Helper.transporter_java_ext_dir.shellescape}",
290
+ '-XX:NewSize=2m',
291
+ '-Xms32m',
292
+ '-Xmx1024m',
293
+ '-Xms1024m',
294
+ '-Djava.awt.headless=true',
295
+ '-Dsun.net.http.retryPost=false',
296
+ java_code_option,
297
+ '-m provider',
298
+ "-u #{username.shellescape}",
299
+ "-p #{password.shellescape}",
300
+ '2>&1' # cause stderr to be written to stdout
301
+ ].compact.join(' ')
302
+ end
303
+
273
304
  def java_code_option
274
305
  if Helper.mac? && Helper.xcode_at_least?(9)
275
306
  return "-jar #{Helper.transporter_java_jar_path.shellescape}"
@@ -297,6 +328,8 @@ module FastlaneCore
297
328
  end
298
329
 
299
330
  class ItunesTransporter
331
+ # Matches a line in the provider table: "12 Initech Systems Inc LG89CQY559"
332
+ PROVIDER_REGEX = /^\d+\s{2,}.+\s{2,}[^\s]+$/
300
333
  TWO_STEP_HOST_PREFIX = "deliver.appspecific"
301
334
 
302
335
  # This will be called from the Deliverfile, and disables the logging of the transporter output
@@ -401,6 +434,21 @@ module FastlaneCore
401
434
  result
402
435
  end
403
436
 
437
+ def provider_ids
438
+ command = @transporter_executor.build_provider_ids_command(@user, @password)
439
+ UI.verbose(@transporter_executor.build_provider_ids_command(@user, 'YourPassword'))
440
+ lines = []
441
+ begin
442
+ result = @transporter_executor.execute(command, ItunesTransporter.hide_transporter_output?) { |xs| lines = xs }
443
+ return result if Helper.test?
444
+ rescue TransporterRequiresApplicationSpecificPasswordError => ex
445
+ handle_two_step_failure(ex)
446
+ return provider_ids
447
+ end
448
+
449
+ lines.map { |line| provider_pair(line) }.compact.to_h
450
+ end
451
+
404
452
  private
405
453
 
406
454
  TWO_FACTOR_ENV_VARIABLE = "FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"
@@ -462,5 +510,11 @@ module FastlaneCore
462
510
  def handle_error(password)
463
511
  @transporter_executor.handle_error(password)
464
512
  end
513
+
514
+ def provider_pair(line)
515
+ line = line.strip
516
+ return nil unless line =~ PROVIDER_REGEX
517
+ line.split(/\s{2,}/).drop(1)
518
+ end
465
519
  end
466
520
  end
@@ -3,19 +3,18 @@ require_relative 'frame_downloader'
3
3
 
4
4
  module Frameit
5
5
  class Offsets
6
- # Returns the image offset needed for a certain device type for a given orientation
7
- # uses deliver to detect the screen size
6
+ # Returns the image offset needed for a certain device type
8
7
  def self.image_offset(screenshot)
9
8
  require 'json'
10
9
 
11
- unless @offsets
10
+ unless @offsets_cache
12
11
  offsets_json_path = File.join(FrameDownloader.new.templates_path, "offsets.json")
13
12
  UI.user_error!("Could not find offsets.json file at path '#{offsets_json_path}'") unless File.exist?(offsets_json_path)
14
- @offsets = JSON.parse(File.read(offsets_json_path))
13
+ @offsets_cache = JSON.parse(File.read(offsets_json_path))
15
14
  end
16
15
 
17
- offset_value = @offsets["portrait"][screenshot.device_name]
18
- UI.error("Tried looking for offset information for 'portrait', #{screenshot.device_name}") unless offset_value
16
+ offset_value = @offsets_cache["portrait"][screenshot.device_name]
17
+ UI.error("Tried looking for offset information for 'portrait', #{screenshot.device_name} in '#{offsets_json_path}'") unless offset_value
19
18
  return offset_value
20
19
  end
21
20
  end
@@ -34,7 +34,7 @@ module Pilot
34
34
  package_path: dir,
35
35
  platform: platform)
36
36
 
37
- transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider])
37
+ transporter = transporter_for_selected_team(options)
38
38
  result = transporter.upload(app.apple_id, package_path)
39
39
 
40
40
  unless result
@@ -212,6 +212,25 @@ module Pilot
212
212
  !options[:localized_build_info].nil?
213
213
  end
214
214
 
215
+ # If itc_provider was explicitly specified, use it.
216
+ # If there are multiple teams, infer the provider from the selected team name.
217
+ # If there are fewer than two teams, don't infer the provider.
218
+ def transporter_for_selected_team(options)
219
+ generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider])
220
+ return generic_transporter unless options[:itc_provider].nil? && Spaceship::Tunes.client.teams.count > 1
221
+
222
+ begin
223
+ team = Spaceship::Tunes.client.teams.find { |t| t['contentProvider']['contentProviderId'].to_s == Spaceship::Tunes.client.team_id }
224
+ name = team['contentProvider']['name']
225
+ provider_id = generic_transporter.provider_ids[name]
226
+ UI.verbose("Inferred provider id #{provider_id} for team #{name}.")
227
+ return FastlaneCore::ItunesTransporter.new(options[:username], nil, false, provider_id)
228
+ rescue => ex
229
+ UI.verbose("Couldn't infer a provider short name for team with id #{Spaceship::Tunes.client.team_id} automatically: #{ex}. Proceeding without provider short name.")
230
+ return generic_transporter
231
+ end
232
+ end
233
+
215
234
  def distribute_build(uploaded_build, options)
216
235
  UI.message("Distributing new build to testers: #{uploaded_build.train_version} - #{uploaded_build.build_version}")
217
236
 
@@ -224,7 +224,7 @@ module Pilot
224
224
  # rubocop:disable Metrics/LineLength
225
225
  FastlaneCore::ConfigItem.new(key: :itc_provider,
226
226
  env_name: "PILOT_ITC_PROVIDER",
227
- description: "The provider short name to be used with the iTMSTransporter to identify your team. To get provider short name run `pathToXcode.app/Contents/Applications/Application\\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column",
227
+ description: "The provider short name to be used with the iTMSTransporter to identify your team. This value will override the automatically detected provider short name. To get provider short name run `pathToXcode.app/Contents/Applications/Application\\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column",
228
228
  optional: true),
229
229
  # rubocop:enable Metrics/LineLength
230
230
 
@@ -195,15 +195,21 @@ module Screengrab
195
195
  end
196
196
 
197
197
  def uninstall_apks(device_serial, app_package_name, tests_package_name)
198
- UI.message('Uninstalling app APK')
199
- run_adb_command("adb -s #{device_serial} uninstall #{app_package_name}",
200
- print_all: true,
201
- print_command: true)
198
+ packages = installed_packages(device_serial)
202
199
 
203
- UI.message('Uninstalling tests APK')
204
- run_adb_command("adb -s #{device_serial} uninstall #{tests_package_name}",
205
- print_all: true,
206
- print_command: true)
200
+ if packages.include?(app_package_name.to_s)
201
+ UI.message('Uninstalling app APK')
202
+ run_adb_command("adb -s #{device_serial} uninstall #{app_package_name}",
203
+ print_all: true,
204
+ print_command: true)
205
+ end
206
+
207
+ if packages.include?(tests_package_name.to_s)
208
+ UI.message('Uninstalling tests APK')
209
+ run_adb_command("adb -s #{device_serial} uninstall #{tests_package_name}",
210
+ print_all: true,
211
+ print_command: true)
212
+ end
207
213
  end
208
214
 
209
215
  def grant_permissions(device_serial)
@@ -351,6 +357,14 @@ module Screengrab
351
357
  # We can safely ignore that and treat it as if it returned 'No such file'
352
358
  end
353
359
 
360
+ # Return an array of packages that are installed on the device
361
+ def installed_packages(device_serial)
362
+ packages = run_adb_command("adb -s #{device_serial} shell pm list packages",
363
+ print_all: true,
364
+ print_command: true)
365
+ packages.split("\n").map { |package| package.gsub("package:", "") }
366
+ end
367
+
354
368
  def run_adb_command(command, print_all: false, print_command: false)
355
369
  adb_path = @android_env.adb_path.chomp("adb")
356
370
  output = @executor.execute(command: adb_path + command,
@@ -97,11 +97,11 @@ This requires you to install `pry` using `sudo gem install pry`. `pry` is not in
97
97
 
98
98
  ## Apple Developer Portal API
99
99
 
100
- ##### Open [DeveloperPortal.md](docs/DeveloperPortal.md) for code samples
100
+ Open [DeveloperPortal.md](docs/DeveloperPortal.md) for code samples
101
101
 
102
102
  ## App Store Connect API
103
103
 
104
- ##### Open [AppStoreConnect.md](docs/AppStoreConnect.md) for code samples
104
+ Open [AppStoreConnect.md](docs/AppStoreConnect.md) for code samples
105
105
 
106
106
  ## 2 Step Verification
107
107
 
@@ -123,24 +123,9 @@ This will authenticate you and provide a string that can be transferred to your
123
123
  export FASTLANE_SESSION='---\n- !ruby/object:HTTP::Cookie\n name: DES5c148586dfd451e55afbaaa5f62418f91\n value: HSARMTKNSRVTWFla1+yO4gVPowH17VaaaxPFnUdMUegQZxqy1Ie1c2v6bM1vSOzIbuOmrl/FNenlScsd/NbF7/Lw4cpnL15jsyg0TOJwP32tC/NguPiyOaaaU+jrj4tf4uKdIywVaaaFSRVT\n domain: idmsa.apple.com\n for_domain: true\n path: "/"\n secure: true\n httponly: true\n expires: 2016-04-27 23:55:56.000000000 Z\n max_age: \n created_at: 2016-03-28 16:55:57.032086000 -07:00\n accessed_at: 2016-03-28 19:11:17.828141000 -07:00\n'
124
124
  ```
125
125
 
126
- #### Bypass trusted device and use SMS for verification
127
-
128
- If you have a trusted device configured, Apple will not send a SMS code to your phone for your Apple account when you try to generate a web session with _fastlane_. Instead, a code will be displayed on one of your account's trusted devices. This can be problematic if you are trying to authenticate but don't have access to a trusted device. Take the following steps to circumvent the device and use SMS instead:
129
-
130
- - Attempt to generate a web session with `fastlane spaceauth -u [email]` and wait for security code prompt to appear
131
- - Open a browser to [appleid.apple.com](https://appleid.apple.com) or an address that requires you to login with your Apple ID, and logout of any previous session
132
- - Login with your Apple ID and request a code be sent to the desired phone when prompted for a security code
133
- - Use the code sent to phone with _fastlane_ instead of with the browser
134
-
135
126
  #### Transporter
136
127
 
137
- If you want to upload builds to TestFlight/App Store Connect from your CI, you have to generate and use an application specific password:
138
-
139
- 1. Visit [appleid.apple.com/account/manage](https://appleid.apple.com/account/manage)
140
- 1. Generate a new application specific password
141
- 1. Provide the application specific password using an environment variable `FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD`.
142
-
143
- Alternatively you can enter the application specific password when you're asked the first time _fastlane_ uploads a build.
128
+ See [Continuous Integration > Authentication with Apple services > Application specific passwords](https://docs.fastlane.tools/best-practices/continuous-integration/#application-specific-passwords)
144
129
 
145
130
  ## _spaceship_ in use
146
131
 
@@ -152,7 +137,8 @@ All [fastlane tools](https://fastlane.tools) that communicate with Apple's web s
152
137
 
153
138
  Overview of the used API endpoints
154
139
 
155
- - `https://idmsa.apple.com`: Used to authenticate to get a valid session
140
+ - `https://idmsa.apple.com`:
141
+ - Used to authenticate to get a valid session
156
142
  - `https://developerservices2.apple.com`:
157
143
  - Get a list of all available provisioning profiles
158
144
  - Register new devices
@@ -1,7 +1,33 @@
1
1
  module Spaceship
2
2
  module Tunes
3
+ # identifiers of devices that App Store Connect accepts screenshots for
3
4
  class DeviceType
4
- @types = ['iphone35', 'iphone4', 'iphone6', 'iphone6Plus', 'iphone58', 'iphone65', 'ipad', 'ipad105', 'ipadPro', 'ipadPro11', 'ipadPro129', 'watch', 'watchSeries4', 'appleTV', 'desktop']
5
+ @types = [
6
+ # iPhone
7
+ 'iphone35',
8
+ 'iphone4',
9
+ 'iphone6', # 4.7-inch Display
10
+ 'iphone6Plus', # 5.5-inch Display
11
+ 'iphone58', # iPhone XS
12
+ 'iphone65', # iPhone XS Max
13
+
14
+ # iPad
15
+ 'ipad', # 9.7-inch Display
16
+ 'ipad105',
17
+ 'ipadPro',
18
+ 'ipadPro11',
19
+ 'ipadPro129',
20
+
21
+ # Apple Watch
22
+ 'watch', # series 3
23
+ 'watchSeries4',
24
+
25
+ # Apple TV
26
+ 'appleTV',
27
+
28
+ # Mac
29
+ 'desktop'
30
+ ]
5
31
  class << self
6
32
  attr_accessor :types
7
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.119.0.beta.20190322200024
4
+ version: 2.119.0.beta.20190323200019
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iulian Onofrei
@@ -27,7 +27,7 @@ authors:
27
27
  autorequire:
28
28
  bindir: bin
29
29
  cert_chain: []
30
- date: 2019-03-22 00:00:00.000000000 Z
30
+ date: 2019-03-23 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: slack-notifier
@@ -1688,24 +1688,24 @@ metadata:
1688
1688
  post_install_message:
1689
1689
  rdoc_options: []
1690
1690
  require_paths:
1691
- - scan/lib
1692
- - frameit/lib
1691
+ - deliver/lib
1692
+ - cert/lib
1693
+ - produce/lib
1694
+ - fastlane_core/lib
1693
1695
  - pilot/lib
1694
- - snapshot/lib
1696
+ - match/lib
1695
1697
  - spaceship/lib
1696
1698
  - supply/lib
1697
- - gym/lib
1698
- - match/lib
1699
+ - precheck/lib
1700
+ - sigh/lib
1699
1701
  - fastlane/lib
1700
- - fastlane_core/lib
1701
- - deliver/lib
1702
1702
  - credentials_manager/lib
1703
- - screengrab/lib
1704
- - cert/lib
1705
- - sigh/lib
1706
- - precheck/lib
1703
+ - frameit/lib
1704
+ - snapshot/lib
1705
+ - gym/lib
1707
1706
  - pem/lib
1708
- - produce/lib
1707
+ - scan/lib
1708
+ - screengrab/lib
1709
1709
  required_ruby_version: !ruby/object:Gem::Requirement
1710
1710
  requirements:
1711
1711
  - - ">="