class Spaceship::Tunes::Build
Represents a build which is inside the build train
Attributes
@return (String
) The name of the app this build is for
@return (Spaceship::Tunes::BuildTrain
) A reference to the build train this build is contained in
@return (String
) The build version (not the version number), but also is named `build number`
@return (Integer) Might be nil. The number of crashes of this build
@return (Integer): When is the external build going to expire?
@return (Integer) Number of installs for this build that come from external users
@return (Bool) Is external beta testing enabled for this train? Only one train can have enabled testing.
@return (String
) The status of internal testflight testing for this build. One of active, submitForReview, approvedInactive, waiting
@return (String
) URL to the app icon of this build (150x150px)
@return (Integer) The ID generated by App
Store Connect
@return (Integer) Number of installs of this build
@return (Integer) When is this build going to be invalid
@return (Integer) Number of installs for this build that come from internal users
@return (Bool) Is internal beta testing enabled for this train? Only one train can have enabled testing.
@return (String
) The platform of this build (e.g. 'ios')
@return (Boolean) Is this build currently processing?
@return (String
) The build processing state, may be nil @example “invalidBinary” @example “processingFailed”
@return (Bool):
@return (Integer) Might be nil. The number of sessions for this build
@return (String
) The version number (e.g. 1.3)
@return (Integer) The number of ticks since 1970 (e.g. 1413966436000)
@return (Boolean)
@return (Bool) Does this build support WatchKit?
Public Instance Methods
This will cancel the review process for this TestFlight
build
# File spaceship/lib/spaceship/tunes/build.rb, line 207 def cancel_beta_review! client.remove_testflight_build_from_review!(app_id: self.apple_id, train: self.train_version, build_number: self.build_version, platform: self.platform) end
# File spaceship/lib/spaceship/tunes/build.rb, line 124 def details response = client.build_details(app_id: self.apple_id, train: self.train_version, build_number: self.build_version, platform: self.platform) response['apple_id'] = self.apple_id BuildDetails.factory(response) end
# File spaceship/lib/spaceship/tunes/build.rb, line 117 def setup super self.external_expiry_date ||= 0 self.internal_expiry_date ||= 0 end
This will submit this build for TestFlight
beta review @param metadata [Hash] A hash containing the following information (keys must be symbols):
{ # Required Metadata: changelog: "Changelog", description: "Your Description", feedback_email: "Email Address for Feedback", marketing_url: "https://marketing.com", first_name: "Felix", last_name: "Krause", review_email: "Contact email address for Apple", phone_number: "0128383383", review_notes: "Review notes" # Optional Metadata: privacy_policy_url: nil, review_notes: nil, review_user_name: nil, review_password: nil, encryption: false }
Note that iTC will pull a lot of this information from previous builds or the app store information, all of the required values must be set either in this hash or automatically for this to work
# File spaceship/lib/spaceship/tunes/build.rb, line 177 def submit_for_beta_review!(metadata) parameters = { app_id: self.apple_id, train: self.train_version, build_number: self.build_version, platform: self.platform }.merge(metadata) client.submit_testflight_build_for_review!(parameters) return parameters end
@return [String] A nicely formatted string about the state of this build @examples:
External, Internal, Inactive, Expired
# File spaceship/lib/spaceship/tunes/build.rb, line 193 def testing_status testing ||= "External" if self.external_testing_enabled testing ||= "Internal" if self.internal_testing_enabled if Time.at(self.internal_expiry_date / 1000) > Time.now testing ||= "Inactive" else testing = "Expired" end return testing end
# File spaceship/lib/spaceship/tunes/build.rb, line 138 def update_build_information!(whats_new: nil, description: nil, feedback_email: nil) parameters = { app_id: self.apple_id, train: self.train_version, build_number: self.build_version, platform: self.platform }.merge({ whats_new: whats_new, description: description, feedback_email: feedback_email }) client.update_build_information!(parameters) end