Saturday, June 22, 2024
HomeiOS Developmentcicd - Tips on how to Robotically Deal with Closed Prepare Variations...

cicd – Tips on how to Robotically Deal with Closed Prepare Variations in Fastlane for iOS Builds?


I am automating the construct and launch course of for my iOS software utilizing Fastlane and have run into an issue with model administration that stops my course of chilly. I am hoping to discover a technique to resolve this programmatically with out guide intervention.

Listed here are the strategies I am utilizing to handle the construct quantity and model identify:

Technique to Get Construct Quantity:

def bump_build_number()
  latest_build_number = latest_testflight_build_number(initial_build_number: 0)
  return (latest_build_number + 1)
finish

Technique to Get Model Title:

def get_version_name()
  version_name = lane_context[SharedValues::LATEST_TESTFLIGHT_VERSION]
  
  if version_name.empty?
    places "*** Model identify is empty, including model 1.0.0 ***"
    version_name = "1.0.0"
  finish
  
  return version_name
finish

Utilizing the Variables:

build_number = bump_build_number()
version_name = get_version_name()
sh("flutter", "construct", "ipa", "--release", "--build-number=#{build_number}", "--build-name=#{version_name}", "--flavor=manufacturing")

Every thing appears to work positive up up to now. Nevertheless, after I run fastlane ios release_beta, the App Retailer returns the next error and halts the method:

ERROR: [ContentDelivery.Uploader] Asset validation failed (90186) Invalid Pre-Launch Prepare. The practice model '1.1.16' is closed for brand new construct submissions (ID: xxxxx)

Subject:
The error message signifies that the model ‘1.1.16’ is closed for brand new construct submissions. I have to deal with this error programmatically to make sure the construct and model numbers are accurately managed and the method runs easily with none guide actions.

Query:
How can I mechanically deal with this error and replace the model quantity appropriately to stop the method from stopping?

Any insights or recommendations could be enormously appreciated!



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments