Class: FastlaneFlutterFlavor::IosLanes
- Inherits:
-
Object
- Object
- FastlaneFlutterFlavor::IosLanes
- Defined in:
- lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb
Overview
IosLanes (Helper Class)
Instance Method Summary collapse
- #backup_xcarchive(xcarchive:, destination:, zip_filename:) ⇒ Object
- #download_from_store(package_name:, api_key_path:, metadata_path:, screenshots_path:, deliver_file:, platform: "ios", use_live_version: false) ⇒ Object
- #get_deliver_file(platform: "ios") ⇒ Object
-
#get_metadata_path(platform: "ios", metadata_path: nil, flavor:, distribution_platform:) ⇒ Object
Resolves the metadata path: either a custom one relative to the root, or the standard Fastlane structure.
-
#get_screenshots_path(platform: "ios", screenshots_path: nil, flavor:, distribution_platform:) ⇒ Object
Resolves the screenshots path: either a custom one relative to the root, or the standard Fastlane structure.
-
#initialize(lane:, root_folder:) ⇒ IosLanes
constructor
A new instance of IosLanes.
- #sigh(app_identifier:, api_key_path:, team_id:) ⇒ Object
- #update_code_signing_settings(team_id:, code_sign_identity:, profile_name:, build_configurations:) ⇒ Object
- #upload_to_store(ipa_file:, bundle_identifier:, api_key_path:, metadata_path:, screenshots_path:, app_version:, build_number:, skip_upload_binary: false, skip_upload_prod: false, skip_upload_metadata: false, skip_upload_screenshots: false, export_compliance_uses_encryption: nil, add_id_info_uses_idfa: nil, platform: "ios") ⇒ Object
Constructor Details
#initialize(lane:, root_folder:) ⇒ IosLanes
Returns a new instance of IosLanes.
12 13 14 15 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb', line 12 def initialize(lane: ,root_folder:) @lane = lane @root_folder = root_folder end |
Instance Method Details
#backup_xcarchive(xcarchive:, destination:, zip_filename:) ⇒ Object
113 114 115 116 117 118 119 120 121 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb', line 113 def backup_xcarchive(xcarchive:, destination:, zip_filename: ) @lane.other_action.backup_xcarchive( xcarchive: xcarchive, destination: destination, zip: true, zip_filename: zip_filename, versioned: false, ) end |
#download_from_store(package_name:, api_key_path:, metadata_path:, screenshots_path:, deliver_file:, platform: "ios", use_live_version: false) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb', line 78 def download_from_store(package_name:, api_key_path:, metadata_path:, screenshots_path:, deliver_file:, platform:"ios", use_live_version:false) FileUtils.rm_rf() FileUtils.rm_rf(screenshots_path) FileUtils.remove_file(deliver_file, force = true) Fastlane::Actions::sh( "fastlane", "deliver", "init", "--metadata_path", , "--screenshots_path", screenshots_path, "--app_identifier", package_name, "--api_key_path", api_key_path, "--platform", platform, "--use_live_version", use_live_version ? "true" : "false", ) end |
#get_deliver_file(platform: "ios") ⇒ Object
152 153 154 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb', line 152 def get_deliver_file(platform: "ios") return File.join(@root_folder, "fastlane", "Deliverfile") end |
#get_metadata_path(platform: "ios", metadata_path: nil, flavor:, distribution_platform:) ⇒ Object
Resolves the metadata path: either a custom one relative to the root, or the standard Fastlane structure.
125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb', line 125 def (platform: "ios", metadata_path: nil, flavor:, distribution_platform:) # If a custom path is provided (and not nil or empty string), use it. unless .to_s.empty? # Path structure: @root_folder / custom_path / flavor return File.join(@root_folder, , flavor, distribution_platform) end # Default Path: Use the standard Fastlane structure. # Path structure: @root_folder / fastlane / platform / metadata / flavor File.join(@root_folder, "fastlane", platform, 'metadata', flavor, distribution_platform) end |
#get_screenshots_path(platform: "ios", screenshots_path: nil, flavor:, distribution_platform:) ⇒ Object
Resolves the screenshots path: either a custom one relative to the root, or the standard Fastlane structure.
140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb', line 140 def get_screenshots_path(platform: "ios", screenshots_path: nil, flavor:, distribution_platform:) # If a custom path is provided (and not nil or empty string), use it. unless screenshots_path.to_s.empty? # Path structure: @root_folder / custom_path / flavor return File.join(@root_folder, screenshots_path, flavor, distribution_platform) end # Default Path: Use the standard Fastlane structure. # Path structure: @root_folder / fastlane / platform / metadata / flavor File.join(@root_folder, "fastlane", platform, 'screenshots', flavor, distribution_platform) end |
#sigh(app_identifier:, api_key_path:, team_id:) ⇒ Object
94 95 96 97 98 99 100 101 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb', line 94 def sigh(app_identifier:, api_key_path:, team_id:) @lane.other_action.sigh( force: true, app_identifier: app_identifier, api_key_path: api_key_path, team_id: team_id, ) end |
#update_code_signing_settings(team_id:, code_sign_identity:, profile_name:, build_configurations:) ⇒ Object
103 104 105 106 107 108 109 110 111 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb', line 103 def update_code_signing_settings(team_id:, code_sign_identity:, profile_name:, build_configurations:) @lane.other_action.update_code_signing_settings( team_id: team_id, code_sign_identity: code_sign_identity, use_automatic_signing: false, profile_name: profile_name, build_configurations: build_configurations, ) end |
#upload_to_store(ipa_file:, bundle_identifier:, api_key_path:, metadata_path:, screenshots_path:, app_version:, build_number:, skip_upload_binary: false, skip_upload_prod: false, skip_upload_metadata: false, skip_upload_screenshots: false, export_compliance_uses_encryption: nil, add_id_info_uses_idfa: nil, platform: "ios") ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/fastlane/plugin/ann_flutter_flavor/helper/lanes_ios.rb', line 17 def upload_to_store(ipa_file:, bundle_identifier:, api_key_path:, metadata_path:, screenshots_path:, app_version:, build_number:, skip_upload_binary: false, skip_upload_prod: false, skip_upload_metadata: false, skip_upload_screenshots: false, export_compliance_uses_encryption: nil, add_id_info_uses_idfa: nil, platform: "ios") final_build_number = build_number.to_s Fastlane::UI. "App Version: " + app_version Fastlane::UI. "Build Number: " + final_build_number Fastlane::UI. "App identifier: " + bundle_identifier unless skip_upload_binary @lane.other_action.upload_to_testflight( ipa: ipa_file, app_identifier: bundle_identifier, api_key_path: api_key_path, app_version: app_version, build_number: final_build_number, expire_previous_builds: true, skip_waiting_for_build_processing: skip_upload_prod, app_platform: platform, ) end unless skip_upload_prod submission_information = "" unless export_compliance_uses_encryption == nil submission_information += "\"export_compliance_uses_encryption\": #{export_compliance_uses_encryption}" end unless add_id_info_uses_idfa == nil unless submission_information == "" submission_information += "," end submission_information += "\"add_id_info_uses_idfa\": #{add_id_info_uses_idfa}" end submission_information = "{#{submission_information}}" @lane.other_action.upload_to_app_store( build_number: final_build_number, app_identifier: bundle_identifier, app_version: app_version, api_key_path: api_key_path, metadata_path: , screenshots_path: screenshots_path, skip_binary_upload: skip_upload_binary, skip_metadata: , skip_screenshots: skip_upload_screenshots, overwrite_screenshots: skip_upload_screenshots == false, submit_for_review: true, automatic_release: true, force: true, precheck_include_in_app_purchases: false, submission_information:submission_information, platform: platform, ) end end |