Class: Fastlane::Actions::ResignAction
- Inherits:
-
Fastlane::Action
- Object
- Fastlane::Action
- Fastlane::Actions::ResignAction
- Defined in:
- lib/fastlane/actions/resign.rb
Overview
Resigns the ipa
Class Method Summary collapse
- .author ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Methods inherited from Fastlane::Action
action_name, authors, output, return_value, sh, step_text
Class Method Details
.author ⇒ Object
79 80 81 |
# File 'lib/fastlane/actions/resign.rb', line 79 def self. "lmirosevic" end |
.available_options ⇒ Object
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 77 |
# File 'lib/fastlane/actions/resign.rb', line 34 def self. [ FastlaneCore::ConfigItem.new(key: :ipa, env_name: "FL_RESIGN_IPA", description: "Path to the ipa file to resign. Optional if you use the `gym` or `xcodebuild` action", default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH], verify_block: proc do |value| UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value) end), FastlaneCore::ConfigItem.new(key: :signing_identity, env_name: "FL_RESIGN_SIGNING_IDENTITY", description: "Code signing identity to use. e.g. \"iPhone Distribution: Luka Mirosevic (0123456789)\""), FastlaneCore::ConfigItem.new(key: :entitlements, env_name: "FL_RESIGN_ENTITLEMENTS", description: "Path to the entitlement file to use, e.g. \"myApp/MyApp.entitlements\"", is_string: true, optional: true), FastlaneCore::ConfigItem.new(key: :provisioning_profile, env_name: "FL_RESIGN_PROVISIONING_PROFILE", description: "Path to your provisioning_profile. Optional if you use `sigh`", default_value: Actions.lane_context[SharedValues::SIGH_PROFILE_PATH], is_string: false, verify_block: proc do |value| files = case value when Hash then value.values when Enumerable then value else [value] end files.each do |file| UI.user_error!("Couldn't find provisiong profile at path '#{file}'") unless File.exist?(file) end end), FastlaneCore::ConfigItem.new(key: :version, env_name: "FL_RESIGN_VERSION", description: "Version number to force resigned ipa to use", is_string: true, optional: true), FastlaneCore::ConfigItem.new(key: :display_name, env_name: "FL_DISPLAY_NAME", description: "Display name to force resigned ipa to use", is_string: true, optional: true) ] end |
.description ⇒ Object
16 17 18 |
# File 'lib/fastlane/actions/resign.rb', line 16 def self.description "Codesign an existing ipa file" end |
.details ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fastlane/actions/resign.rb', line 20 def self.details [ "You may provide multiple provisioning profiles if the application contains", "nested applications or app extensions, which need their own provisioning", "profile. You can do so by passing an array of provisiong profile strings or a", "hash that associates provisioning profile values to bundle identifier keys.", "", "resign(ipa: \"path\", signing_identity: \"identity\", provisioning_profile: {", " \"com.example.awesome-app\" => \"App.mobileprovision\",", " \"com.example.awesome-app.app-extension\" => \"Extension.mobileprovision\"", "})" ].join("\n") end |
.is_supported?(platform) ⇒ Boolean
83 84 85 |
# File 'lib/fastlane/actions/resign.rb', line 83 def self.is_supported?(platform) platform == :ios end |
.run(params) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/fastlane/actions/resign.rb', line 5 def self.run(params) require 'sigh' # try to resign the ipa if Sigh::Resign.resign(params[:ipa], params[:signing_identity], params[:provisioning_profile], params[:entitlements], params[:version], params[:display_name]) UI.success('Successfully re-signed .ipa 🔏.') else UI.user_error!("Failed to re-sign .ipa") end end |