Skip to content

Commit ffa212f

Browse files
committed
Fix iOS release signing configuration
1 parent 4c00c08 commit ffa212f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

mobile/ios/fastlane/Fastfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require "shellwords"
2+
13
default_platform(:ios)
24

35
def app_store_api_key!
@@ -17,6 +19,7 @@ platform :ios do
1719
profile_name = options[:profile_name] || ENV["IOS_PROFILE_NAME"]
1820
team_id = options[:team_id] || ENV["IOS_TEAM_ID"]
1921
output_name = options[:output_name] || ENV.fetch("IOS_OUTPUT_NAME", "MonkeyCode.ipa")
22+
sign_identity = options[:sign_identity] || ENV.fetch("IOS_CODE_SIGN_IDENTITY", "Apple Distribution")
2023

2124
UI.user_error!("IOS_PROFILE_NAME is required") if profile_name.to_s.empty?
2225
UI.user_error!("IOS_TEAM_ID is required") if team_id.to_s.empty?
@@ -30,9 +33,16 @@ platform :ios do
3033
output_directory: "App/output",
3134
output_name: output_name,
3235
export_method: "app-store",
33-
xcargs: "DEVELOPMENT_TEAM=#{team_id} CODE_SIGN_STYLE=Manual PRODUCT_BUNDLE_IDENTIFIER=#{bundle_id}",
36+
xcargs: [
37+
"DEVELOPMENT_TEAM=#{Shellwords.escape(team_id)}",
38+
"CODE_SIGN_STYLE=Manual",
39+
"PRODUCT_BUNDLE_IDENTIFIER=#{Shellwords.escape(bundle_id)}",
40+
"PROVISIONING_PROFILE_SPECIFIER=#{Shellwords.escape(profile_name)}",
41+
"CODE_SIGN_IDENTITY=#{Shellwords.escape(sign_identity)}",
42+
].join(" "),
3443
export_options: {
3544
signingStyle: "manual",
45+
signingCertificate: sign_identity,
3646
provisioningProfiles: {
3747
bundle_id => profile_name,
3848
},

0 commit comments

Comments
 (0)