@@ -21,7 +21,9 @@ platform :ios do
2121 create_keychain (
2222 name : ENV [ "MATCH_KEYCHAIN_NAME" ] ,
2323 password : ENV [ "MATCH_KEYCHAIN_PASSWORD" ] ,
24- timeout : 1200
24+ timeout : 0 ,
25+ lock_when_sleeps : false ,
26+ unlock : true
2527 )
2628 end
2729
@@ -54,11 +56,16 @@ platform :ios do
5456 key_filepath : 'fastlane/app_store_connect_api_key.p8' ,
5557 in_house : false
5658 )
57- match ( type : "appstore" )
58- get_provisioning_profile ( app_identifier : "chat.rocket.reactnative.ShareExtension" )
59- get_provisioning_profile ( app_identifier : "chat.rocket.reactnative.NotificationService" )
60- get_provisioning_profile ( app_identifier : "chat.rocket.reactnative.watchkitapp" )
59+ match ( type : "appstore" , platform : "ios" )
60+ get_provisioning_profile ( app_identifier : "chat.rocket.reactnative.ShareExtension" , platform : "ios" )
61+ get_provisioning_profile ( app_identifier : "chat.rocket.reactnative.NotificationService" , platform : "ios" )
62+ get_provisioning_profile ( app_identifier : "chat.rocket.reactnative.watchkitapp" , platform : "ios" )
6163 # pem(api_key: api_key) # still uses Spaceship http://docs.fastlane.tools/actions/pem/#how-does-it-work
64+ # Allow codesign to access keys without prompting
65+ keychain_path = "~/Library/Keychains/#{ ENV [ 'MATCH_KEYCHAIN_NAME' ] } -db"
66+ sh "security unlock-keychain -p \" #{ ENV [ 'MATCH_KEYCHAIN_PASSWORD' ] } \" #{ keychain_path } "
67+ sh "security set-keychain-settings -lut 3600 #{ keychain_path } "
68+ sh "security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k \" #{ ENV [ 'MATCH_KEYCHAIN_PASSWORD' ] } \" #{ keychain_path } "
6269 gym (
6370 scheme : "RocketChatRN" ,
6471 workspace : "RocketChatRN.xcworkspace" ,
@@ -72,11 +79,18 @@ platform :ios do
7279
7380 match (
7481 type : "appstore" ,
82+ platform : "ios" ,
7583 app_identifier : [ "chat.rocket.ios" , "chat.rocket.ios.NotificationService" , "chat.rocket.ios.Rocket-Chat-ShareExtension" , "chat.rocket.ios.watchkitapp" ] ,
7684 readonly : true ,
7785 output_path : './'
7886 )
7987
88+ # Allow codesign to access keys without prompting
89+ keychain_path = "~/Library/Keychains/#{ ENV [ 'MATCH_KEYCHAIN_NAME' ] } -db"
90+ sh "security unlock-keychain -p \" #{ ENV [ 'MATCH_KEYCHAIN_PASSWORD' ] } \" #{ keychain_path } "
91+ sh "security set-keychain-settings -lut 3600 #{ keychain_path } "
92+ sh "security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k \" #{ ENV [ 'MATCH_KEYCHAIN_PASSWORD' ] } \" #{ keychain_path } || true"
93+
8094 update_code_signing_settings (
8195 profile_name : "match AppStore chat.rocket.ios.NotificationService" ,
8296 build_configurations : "Release" ,
0 commit comments