fastlane 2.98.0 → 2.99.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +70 -70
  3. data/credentials_manager/lib/credentials_manager/appfile_config.rb +1 -1
  4. data/deliver/lib/assets/DeliverfileDefault +1 -1
  5. data/deliver/lib/assets/DeliverfileDefault.swift +1 -1
  6. data/deliver/lib/assets/summary.html.erb +1 -1
  7. data/deliver/lib/deliver/commands_generator.rb +2 -2
  8. data/deliver/lib/deliver/detect_values.rb +1 -1
  9. data/deliver/lib/deliver/download_screenshots.rb +1 -1
  10. data/deliver/lib/deliver/options.rb +3 -3
  11. data/deliver/lib/deliver/runner.rb +9 -9
  12. data/deliver/lib/deliver/submit_for_review.rb +3 -3
  13. data/deliver/lib/deliver/upload_metadata.rb +3 -3
  14. data/deliver/lib/deliver/upload_screenshots.rb +2 -2
  15. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +3 -3
  16. data/fastlane/lib/fastlane/actions/cocoapods.rb +1 -0
  17. data/fastlane/lib/fastlane/actions/create_app_online.rb +1 -1
  18. data/fastlane/lib/fastlane/actions/docs/check_app_store_metadata.md +3 -3
  19. data/fastlane/lib/fastlane/actions/docs/create_app_online.md +8 -8
  20. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +1 -1
  21. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +2 -2
  22. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +14 -14
  23. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +2 -2
  24. data/fastlane/lib/fastlane/actions/download_dsyms.rb +7 -7
  25. data/fastlane/lib/fastlane/actions/github_api.rb +2 -0
  26. data/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +2 -2
  27. data/fastlane/lib/fastlane/actions/set_changelog.rb +6 -6
  28. data/fastlane/lib/fastlane/actions/upload_to_app_store.rb +1 -1
  29. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +1 -1
  30. data/fastlane/lib/fastlane/command_line_handler.rb +2 -2
  31. data/fastlane/lib/fastlane/commands_generator.rb +1 -0
  32. data/fastlane/lib/fastlane/fast_file.rb +8 -6
  33. data/fastlane/lib/fastlane/lane_manager.rb +0 -3
  34. data/fastlane/lib/fastlane/runner.rb +1 -9
  35. data/fastlane/lib/fastlane/server/socket_server.rb +4 -2
  36. data/fastlane/lib/fastlane/setup/setup_ios.rb +12 -12
  37. data/fastlane/lib/fastlane/swift_lane_manager.rb +9 -8
  38. data/fastlane/lib/fastlane/version.rb +1 -1
  39. data/fastlane/swift/Appfile.swift +1 -1
  40. data/fastlane/swift/ArgumentProcessor.swift +3 -1
  41. data/fastlane/swift/ControlCommand.swift +0 -1
  42. data/fastlane/swift/Deliverfile.swift +1 -1
  43. data/fastlane/swift/Fastlane.swift +3 -3
  44. data/fastlane/swift/Gymfile.swift +1 -1
  45. data/fastlane/swift/LaneFileProtocol.swift +0 -1
  46. data/fastlane/swift/Matchfile.swift +1 -1
  47. data/fastlane/swift/Precheckfile.swift +1 -1
  48. data/fastlane/swift/RubyCommand.swift +0 -1
  49. data/fastlane/swift/RubyCommandable.swift +0 -1
  50. data/fastlane/swift/Runner.swift +7 -7
  51. data/fastlane/swift/RunnerArgument.swift +0 -1
  52. data/fastlane/swift/Scanfile.swift +1 -1
  53. data/fastlane/swift/Screengrabfile.swift +1 -1
  54. data/fastlane/swift/Snapshotfile.swift +1 -1
  55. data/fastlane/swift/SocketClient.swift +0 -1
  56. data/fastlane/swift/SocketClientDelegateProtocol.swift +0 -1
  57. data/fastlane/swift/SocketResponse.swift +0 -1
  58. data/fastlane/swift/main.swift +2 -2
  59. data/fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb +10 -39
  60. data/fastlane_core/lib/fastlane_core/analytics/analytics_ingester_client.rb +34 -30
  61. data/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb +16 -176
  62. data/fastlane_core/lib/fastlane_core/analytics/app_identifier_guesser.rb +1 -1
  63. data/fastlane_core/lib/fastlane_core/build_watcher.rb +2 -2
  64. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +8 -8
  65. data/fastlane_core/lib/fastlane_core/module.rb +2 -5
  66. data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb +0 -1
  67. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +5 -7
  68. data/gym/lib/gym/detect_values.rb +23 -0
  69. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +1 -21
  70. data/match/lib/match/spaceship_ensure.rb +1 -1
  71. data/pilot/lib/pilot/build_manager.rb +2 -2
  72. data/pilot/lib/pilot/manager.rb +2 -2
  73. data/pilot/lib/pilot/options.rb +4 -4
  74. data/precheck/lib/precheck/options.rb +2 -2
  75. data/produce/lib/produce/commands_generator.rb +1 -1
  76. data/produce/lib/produce/developer_center.rb +1 -1
  77. data/produce/lib/produce/itunes_connect.rb +6 -6
  78. data/produce/lib/produce/options.rb +4 -4
  79. data/scan/lib/scan/test_command_generator.rb +6 -2
  80. data/screengrab/lib/screengrab/runner.rb +2 -2
  81. data/sigh/lib/sigh/runner.rb +6 -1
  82. data/snapshot/lib/assets/SnapshotHelper.swift +0 -1
  83. data/snapshot/lib/assets/SnapshotHelperXcode8.swift +0 -1
  84. data/spaceship/README.md +3 -3
  85. data/spaceship/lib/spaceship.rb +1 -1
  86. data/spaceship/lib/spaceship/client.rb +12 -7
  87. data/spaceship/lib/spaceship/du/du_client.rb +1 -1
  88. data/spaceship/lib/spaceship/errors.rb +1 -1
  89. data/spaceship/lib/spaceship/module.rb +1 -1
  90. data/spaceship/lib/spaceship/playground.rb +3 -3
  91. data/spaceship/lib/spaceship/portal/portal_client.rb +2 -2
  92. data/spaceship/lib/spaceship/spaceauth_runner.rb +5 -5
  93. data/spaceship/lib/spaceship/test_flight/client.rb +12 -1
  94. data/spaceship/lib/spaceship/test_flight/group.rb +1 -1
  95. data/spaceship/lib/spaceship/test_flight/tester.rb +1 -1
  96. data/spaceship/lib/spaceship/tunes/app_analytics.rb +143 -0
  97. data/spaceship/lib/spaceship/tunes/app_details.rb +1 -1
  98. data/spaceship/lib/spaceship/tunes/app_image.rb +1 -1
  99. data/spaceship/lib/spaceship/tunes/app_screenshot.rb +1 -1
  100. data/spaceship/lib/spaceship/tunes/app_status.rb +2 -2
  101. data/spaceship/lib/spaceship/tunes/app_submission.rb +1 -1
  102. data/spaceship/lib/spaceship/tunes/app_trailer.rb +1 -1
  103. data/spaceship/lib/spaceship/tunes/app_version.rb +6 -6
  104. data/spaceship/lib/spaceship/tunes/app_version_history.rb +1 -1
  105. data/spaceship/lib/spaceship/tunes/app_version_states_history.rb +1 -1
  106. data/spaceship/lib/spaceship/tunes/application.rb +15 -4
  107. data/spaceship/lib/spaceship/tunes/availability.rb +24 -8
  108. data/spaceship/lib/spaceship/tunes/b2b_user.rb +7 -2
  109. data/spaceship/lib/spaceship/tunes/build.rb +2 -2
  110. data/spaceship/lib/spaceship/tunes/build_details.rb +1 -1
  111. data/spaceship/lib/spaceship/tunes/build_train.rb +2 -2
  112. data/spaceship/lib/spaceship/tunes/errors.rb +1 -1
  113. data/spaceship/lib/spaceship/tunes/iap.rb +2 -2
  114. data/spaceship/lib/spaceship/tunes/iap_status.rb +1 -1
  115. data/spaceship/lib/spaceship/tunes/iap_type.rb +1 -1
  116. data/spaceship/lib/spaceship/tunes/tunes.rb +1 -0
  117. data/spaceship/lib/spaceship/tunes/tunes_client.rb +41 -13
  118. data/spaceship/lib/spaceship/two_step_client.rb +1 -1
  119. metadata +15 -14
@@ -96,7 +96,7 @@ module Spaceship
96
96
  parse_upload_response(r)
97
97
  end
98
98
 
99
- # You can find this by uploading an image in iTunes connect
99
+ # You can find this by uploading an image in App Store Connect
100
100
  # then look for the X-Apple-Upload-Validation-RuleSets value
101
101
  def picture_type_map
102
102
  # rubocop:enable Layout/ExtraSpacing
@@ -68,6 +68,6 @@ module Spaceship
68
68
  # Raised when 401 is received from portal request
69
69
  class UnauthorizedAccessError < BasicPreferredInfoError; end
70
70
 
71
- # Raised when 500 is received from iTunes Connect
71
+ # Raised when 500 is received from App Store Connect
72
72
  class InternalServerError < BasicPreferredInfoError; end
73
73
  end
@@ -1,4 +1,4 @@
1
1
  module Spaceship
2
2
  ROOT = Pathname.new(File.expand_path('../../..', __FILE__))
3
- DESCRIPTION = "Ruby library to access the Apple Dev Center and iTunes Connect".freeze
3
+ DESCRIPTION = "Ruby library to access the Apple Dev Center and App Store Connect".freeze
4
4
  end
@@ -33,12 +33,12 @@ module Spaceship
33
33
 
34
34
  def run
35
35
  begin
36
- puts("Logging into to iTunes Connect (#{@username})...")
36
+ puts("Logging into to App Store Connect (#{@username})...")
37
37
  Spaceship::Tunes.login(@username)
38
- puts("Successfully logged in to iTunes Connect".green)
38
+ puts("Successfully logged in to App Store Connect".green)
39
39
  puts("")
40
40
  rescue
41
- puts("Could not login to iTunes Connect...".red)
41
+ puts("Could not login to App Store Connect...".red)
42
42
  end
43
43
  begin
44
44
  puts("Logging into the Developer Portal (#{@username})...")
@@ -28,8 +28,8 @@ module Spaceship
28
28
  return response if self.cookie.include?("myacinfo")
29
29
 
30
30
  # When the user has 2 step enabled, we might have to call this method again
31
- # This only occurs when the user doesn't have a team on iTunes Connect
32
- # For 2 step verification we use the iTunes Connect back-end
31
+ # This only occurs when the user doesn't have a team on App Store Connect
32
+ # For 2 step verification we use the App Store Connect back-end
33
33
  # which is enough to get the DES... cookie, however we don't get a valid
34
34
  # myacinfo cookie at that point. That means, after getting the DES... cookie
35
35
  # we have to send the login request again. This will then get us a valid myacinfo
@@ -14,17 +14,17 @@ module Spaceship
14
14
 
15
15
  def run
16
16
  begin
17
- puts("Logging into to iTunes Connect (#{@username})...")
17
+ puts("Logging into to App Store Connect (#{@username})...")
18
18
  Spaceship::Tunes.login(@username)
19
- puts("Successfully logged in to iTunes Connect".green)
19
+ puts("Successfully logged in to App Store Connect".green)
20
20
  puts("")
21
21
  rescue
22
- puts("Could not login to iTunes Connect".red)
22
+ puts("Could not login to App Store Connect".red)
23
23
  puts("Please check your credentials and try again.".yellow)
24
- puts("This could be an issue with iTunes Connect,".yellow)
24
+ puts("This could be an issue with App Store Connect,".yellow)
25
25
  puts("Please try unsetting the FASTLANE_SESSION environment variable".yellow)
26
26
  puts("and re-run `fastlane spaceauth`".yellow)
27
- raise "Problem connecting to iTunes Connect"
27
+ raise "Problem connecting to App Store Connect"
28
28
  end
29
29
 
30
30
  itc_cookie_content = Spaceship::Tunes.client.store_cookie
@@ -164,6 +164,17 @@ module Spaceship
164
164
  testers
165
165
  end
166
166
 
167
+ #####################################################
168
+ # @!Internal Testers
169
+ #####################################################
170
+ def internal_users(app_id: nil)
171
+ assert_required_params(__method__, binding)
172
+ url = "providers/#{team_id}/apps/#{app_id}/internalUsers"
173
+ r = request(:get, url)
174
+
175
+ parse_response(r, 'data')
176
+ end
177
+
167
178
  ##
168
179
  # @!group Testers API
169
180
  ##
@@ -317,7 +328,7 @@ module Spaceship
317
328
 
318
329
  raise UnexpectedResponse, response.body['error'] if response.body['error']
319
330
 
320
- raise UnexpectedResponse, "Temporary iTunes Connect error: #{response.body}" if response.body['statusCode'] == 'ERROR'
331
+ raise UnexpectedResponse, "Temporary App Store Connect error: #{response.body}" if response.body['statusCode'] == 'ERROR'
321
332
 
322
333
  return response.body['data'] if response.body['data']
323
334
 
@@ -65,7 +65,7 @@ module Spaceship::TestFlight
65
65
  # It's ok if the tester already exists, we just have to do this... don't ask
66
66
  # This will enable testing for the tester for a given app, as just creating the tester on an account-level
67
67
  # is not enough to add the tester to a group. If this isn't done the next request would fail.
68
- # This is a bug we reported to the iTunes Connect team, as it also happens on the iTunes Connect UI on 18. April 2017
68
+ # This is a bug we reported to the App Store Connect team, as it also happens on the App Store Connect UI on 18. April 2017
69
69
  def add_tester!(tester)
70
70
  # This post request creates an account-level tester and then makes it available to the app, or just makes
71
71
  # it available to the app if it already exists
@@ -3,7 +3,7 @@ require_relative 'base'
3
3
  module Spaceship
4
4
  module TestFlight
5
5
  class Tester < Base
6
- # @return (String) The identifier of this tester, provided by iTunes Connect
6
+ # @return (String) The identifier of this tester, provided by App Store Connect
7
7
  # @example
8
8
  # "60f858b4-60a8-428a-963a-f943a3d68d17"
9
9
  attr_accessor :tester_id
@@ -0,0 +1,143 @@
1
+ require_relative 'tunes_base'
2
+
3
+ module Spaceship
4
+ module Tunes
5
+ class AppAnalytics < TunesBase
6
+ # @return (Integer) The app ID to grab analytics for
7
+ attr_accessor :apple_id
8
+
9
+ class << self
10
+ def factory(attrs)
11
+ return self.new(attrs)
12
+ end
13
+ end
14
+
15
+ def app_units
16
+ start_t, end_t = time_last_7_days
17
+
18
+ app_units_interval(start_t, end_t)
19
+ end
20
+
21
+ def app_views
22
+ start_t, end_t = time_last_7_days
23
+
24
+ app_views_interval(start_t, end_t)
25
+ end
26
+
27
+ def app_in_app_purchases
28
+ start_t, end_t = time_last_7_days
29
+
30
+ app_in_app_purchases_interval(start_t, end_t)
31
+ end
32
+
33
+ def app_sales
34
+ start_t, end_t = time_last_7_days
35
+
36
+ app_sales_interval(start_t, end_t)
37
+ end
38
+
39
+ def app_paying_users
40
+ start_t, end_t = time_last_7_days
41
+
42
+ app_paying_users_interval(start_t, end_t)
43
+ end
44
+
45
+ def app_installs
46
+ start_t, end_t = time_last_7_days
47
+
48
+ app_installs_interval(start_t, end_t)
49
+ end
50
+
51
+ def app_sessions
52
+ start_t, end_t = time_last_7_days
53
+
54
+ app_sessions_interval(start_t, end_t)
55
+ end
56
+
57
+ def app_active_devices
58
+ start_t, end_t = time_last_7_days
59
+
60
+ app_active_devices_interval(start_t, end_t)
61
+ end
62
+
63
+ def app_active_last_30_days
64
+ start_t, end_t = time_last_7_days
65
+
66
+ app_active_last_30_days_interval(start_t, end_t)
67
+ end
68
+
69
+ def app_crashes
70
+ start_t, end_t = time_last_7_days
71
+
72
+ app_crashes_interval(start_t, end_t)
73
+ end
74
+
75
+ def app_units_interval(start_t, end_t)
76
+ client.time_series_analytics([apple_id], ['units'], start_t, end_t, "DAY")
77
+ end
78
+
79
+ def app_views_interval(start_t, end_t)
80
+ client.time_series_analytics([apple_id], ['pageViewCount'], start_t, end_t, "DAY")
81
+ end
82
+
83
+ def app_in_app_purchases_interval(start_t, end_t)
84
+ client.time_series_analytics([apple_id], ['iap'], start_t, end_t, "DAY")
85
+ end
86
+
87
+ def app_sales_interval(start_t, end_t)
88
+ client.time_series_analytics([apple_id], ['sales'], start_t, end_t, "DAY")
89
+ end
90
+
91
+ def app_paying_users_interval(start_t, end_t)
92
+ client.time_series_analytics([apple_id], ['payingUsers'], start_t, end_t, "DAY")
93
+ end
94
+
95
+ def app_installs_interval(start_t, end_t)
96
+ client.time_series_analytics([apple_id], ['installs'], start_t, end_t, "DAY")
97
+ end
98
+
99
+ def app_sessions_interval(start_t, end_t)
100
+ client.time_series_analytics([apple_id], ['sessions'], start_t, end_t, "DAY")
101
+ end
102
+
103
+ def app_active_devices_interval(start_t, end_t)
104
+ client.time_series_analytics([apple_id], ['activeDevices'], start_t, end_t, "DAY")
105
+ end
106
+
107
+ def app_active_last_30_days_interval(start_t, end_t)
108
+ client.time_series_analytics([apple_id], ['rollingActiveDevices'], start_t, end_t, "DAY")
109
+ end
110
+
111
+ def app_crashes_interval(start_t, end_t)
112
+ client.time_series_analytics([apple_id], ['crashes'], start_t, end_t, "DAY")
113
+ end
114
+
115
+ def time_last_7_days
116
+ time = Time.now
117
+ past = time - (60 * 60 * 24 * 7)
118
+ end_t = time.strftime("%Y-%m-%dT00:00:00Z")
119
+ start_t = past.strftime("%Y-%m-%dT00:00:00Z")
120
+
121
+ return start_t, end_t
122
+ end
123
+
124
+ def time_last_30_days
125
+ time = Time.now
126
+ past = time - (60 * 60 * 24 * 30)
127
+ end_t = time.strftime("%Y-%m-%dT00:00:00Z")
128
+ start_t = past.strftime("%Y-%m-%dT00:00:00Z")
129
+
130
+ return start_t, end_t
131
+ end
132
+
133
+ def time_last_90_days
134
+ time = Time.now
135
+ past = time - (60 * 60 * 24 * 90)
136
+ end_t = time.strftime("%Y-%m-%dT00:00:00Z")
137
+ start_t = past.strftime("%Y-%m-%dT00:00:00Z")
138
+
139
+ return start_t, end_t
140
+ end
141
+ end
142
+ end
143
+ end
@@ -78,7 +78,7 @@ module Spaceship
78
78
  end
79
79
  end
80
80
 
81
- # Push all changes that were made back to iTunes Connect
81
+ # Push all changes that were made back to App Store Connect
82
82
  def save!
83
83
  client.update_app_details!(application.apple_id, raw_data)
84
84
  rescue Spaceship::Tunes::Error => ex
@@ -2,7 +2,7 @@ require_relative 'tunes_base'
2
2
 
3
3
  module Spaceship
4
4
  module Tunes
5
- # Represents an image hosted on iTunes Connect. Used for icons, screenshots, etc
5
+ # Represents an image hosted on App Store Connect. Used for icons, screenshots, etc
6
6
  class AppImage < TunesBase
7
7
  HOST_URL = "https://is1-ssl.mzstatic.com/image/thumb"
8
8
 
@@ -2,7 +2,7 @@ require_relative 'app_image'
2
2
 
3
3
  module Spaceship
4
4
  module Tunes
5
- # Represents a screenshot hosted on iTunes Connect
5
+ # Represents a screenshot hosted on App Store Connect
6
6
  class AppScreenshot < Spaceship::Tunes::AppImage
7
7
  attr_accessor :device_type
8
8
 
@@ -25,7 +25,7 @@ module Spaceship
25
25
  # Developer rejected this version/binary
26
26
  DEVELOPER_REJECTED = "Developer Rejected"
27
27
 
28
- # You have to renew your Apple account to keep using iTunes Connect
28
+ # You have to renew your Apple account to keep using App Store Connect
29
29
  PENDING_CONTRACT = "Pending Contract"
30
30
 
31
31
  UPLOAD_RECEIVED = "Upload Received"
@@ -36,7 +36,7 @@ module Spaceship
36
36
  REMOVED_FROM_SALE = "Removed From Sale"
37
37
  # INVALID_BINARY = "Invalid Binary"
38
38
 
39
- # Get the app status matching based on a string (given by iTunes Connect)
39
+ # Get the app status matching based on a string (given by App Store Connect)
40
40
  def self.get_from_string(text)
41
41
  mapping = {
42
42
  'readyForSale' => READY_FOR_SALE,
@@ -2,7 +2,7 @@ require_relative 'tunes_base'
2
2
 
3
3
  module Spaceship
4
4
  module Tunes
5
- # Represents a submission for review of an iTunes Connect Application
5
+ # Represents a submission for review of an App Store Connect Application
6
6
  # This class handles the submission of all review information and documents
7
7
  class AppSubmission < TunesBase
8
8
  # @return (Spaceship::Tunes::Application) A reference to the application
@@ -2,7 +2,7 @@ require_relative 'tunes_base'
2
2
 
3
3
  module Spaceship
4
4
  module Tunes
5
- # Represents a preview video hosted on iTunes Connect. Used for icons, screenshots, etc
5
+ # Represents a preview video hosted on App Store Connect. Used for icons, screenshots, etc
6
6
  class AppTrailer < TunesBase
7
7
  attr_accessor :video_asset_token
8
8
 
@@ -11,7 +11,7 @@ require_relative 'app_status'
11
11
 
12
12
  module Spaceship
13
13
  module Tunes
14
- # Represents an editable version of an iTunes Connect Application
14
+ # Represents an editable version of an App Store Connect Application
15
15
  # This can either be the live or the edit version retrieved via the app
16
16
  # rubocop:disable Metrics/ClassLength
17
17
  class AppVersion < TunesBase
@@ -76,7 +76,7 @@ module Spaceship
76
76
  # @return (Spaceship::Tunes::AppImage) the structure containing information about the large watch icon (1024x1024)
77
77
  attr_accessor :watch_app_icon
78
78
 
79
- # @return (Integer) a unqiue ID for this version generated by iTunes Connect
79
+ # @return (Integer) a unqiue ID for this version generated by App Store Connect
80
80
  attr_accessor :version_id
81
81
 
82
82
  ####
@@ -398,7 +398,7 @@ module Spaceship
398
398
  true
399
399
  end
400
400
 
401
- # Push all changes that were made back to iTunes Connect
401
+ # Push all changes that were made back to App Store Connect
402
402
  def save!
403
403
  client.update_app_version!(application.apple_id, self.version_id, raw_data)
404
404
  end
@@ -423,7 +423,7 @@ module Spaceship
423
423
  end
424
424
 
425
425
  # This method will generate the required keys/values
426
- # for iTunes Connect to validate the uploaded image
426
+ # for App Store Connect to validate the uploaded image
427
427
  def generate_image_metadata(image_data, original_file_name)
428
428
  {
429
429
  assetToken: image_data["token"],
@@ -497,7 +497,7 @@ module Spaceship
497
497
  screenshot_data = client.upload_screenshot(self, upload_file, device, is_messages)
498
498
 
499
499
  # Since October 2016 we also need to pass the size, height, width and checksum
500
- # otherwise iTunes Connect validation will fail at a later point
500
+ # otherwise App Store Connect validation will fail at a later point
501
501
  new_screenshot = {
502
502
  "value" => {
503
503
  "assetToken" => screenshot_data["token"],
@@ -697,7 +697,7 @@ module Spaceship
697
697
  raise "Unexpected state: missing device details for #{device}" unless device_details.key?(data_field)
698
698
  return device_details[data_field]
699
699
  rescue => ex
700
- raise "iTunes Connect error: #{ex}"
700
+ raise "App Store Connect error: #{ex}"
701
701
  end
702
702
 
703
703
  def setup_screenshots
@@ -2,7 +2,7 @@ require_relative 'app_version_states_history'
2
2
 
3
3
  module Spaceship
4
4
  module Tunes
5
- # Represents a read only version of an iTunes Connect Versions State History
5
+ # Represents a read only version of an App Store Connect Versions State History
6
6
  class AppVersionHistory < TunesBase
7
7
  # @return (Spaceship::Tunes::Application) A reference to the application
8
8
  # this version is for
@@ -2,7 +2,7 @@ require_relative 'tunes_base'
2
2
 
3
3
  module Spaceship
4
4
  module Tunes
5
- # Represents a read only version of an iTunes Connect Versions State History
5
+ # Represents a read only version of an App Store Connect Versions State History
6
6
  class AppVersionStatesHistory < TunesBase
7
7
  # @return (String) the state
8
8
  attr_reader :state_key
@@ -1,5 +1,6 @@
1
1
  require_relative '../test_flight/group'
2
2
  require_relative '../test_flight/build'
3
+ require_relative 'app_analytics'
3
4
  require_relative 'app_details'
4
5
  require_relative 'app_ratings'
5
6
  require_relative 'app_submission'
@@ -14,7 +15,7 @@ require_relative 'version_set'
14
15
  module Spaceship
15
16
  module Tunes
16
17
  class Application < TunesBase
17
- # @return (String) The App identifier of this app, provided by iTunes Connect
18
+ # @return (String) The App identifier of this app, provided by App Store Connect
18
19
  # @example
19
20
  # "1013943394"
20
21
  attr_accessor :apple_id
@@ -24,7 +25,7 @@ module Spaceship
24
25
  # "Spaceship App"
25
26
  attr_accessor :name
26
27
 
27
- # @return (String) The Vendor ID provided by iTunes Connect
28
+ # @return (String) The Vendor ID provided by App Store Connect
28
29
  # @example
29
30
  # "1435592086"
30
31
  attr_accessor :vendor_id
@@ -37,7 +38,7 @@ module Spaceship
37
38
  # @return (String) Last modified
38
39
  attr_accessor :last_modified
39
40
 
40
- # @return (Integer) The number of issues provided by iTunes Connect
41
+ # @return (Integer) The number of issues provided by App Store Connect
41
42
  attr_accessor :issues_count
42
43
 
43
44
  # @return (String) The URL to a low resolution app icon of this app (340x340px). Might be nil
@@ -75,7 +76,7 @@ module Spaceship
75
76
  end
76
77
  end
77
78
 
78
- # Creates a new application on iTunes Connect
79
+ # Creates a new application on App Store Connect
79
80
  # @param name (String): The name of your app as it will appear on the App Store.
80
81
  # This can't be longer than 255 characters.
81
82
  # @param primary_language (String): If localized app information isn't available in an
@@ -136,6 +137,16 @@ module Spaceship
136
137
  "https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/#{self.apple_id}"
137
138
  end
138
139
 
140
+ def analytics
141
+ if self.live_version.nil?
142
+ raise 'Analytics are only available for live apps.'
143
+ end
144
+
145
+ attrs = {}
146
+ attrs[:apple_id] = self.apple_id
147
+ Spaceship::Tunes::AppAnalytics.factory(attrs)
148
+ end
149
+
139
150
  # @return (Hash) Contains the reason for rejection.
140
151
  # if everything is alright, the result will be
141
152
  # `{"sectionErrorKeys"=>[], "sectionInfoKeys"=>[], "sectionWarningKeys"=>[], "replyConstraints"=>{"minLength"=>1, "maxLength"=>4000}, "appNotes"=>{"threads"=>[]}, "betaNotes"=>{"threads"=>[]}, "appMessages"=>{"threads"=>[]}}`