Skip to content

Commit cd6ec30

Browse files
committed
fastlane: re-create keychain at runtime
1 parent f9dc282 commit cd6ec30

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

fastlane/Fastfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@ platform :ios do
215215
lane :release do
216216
kc = Keychain.new('fastlane')
217217

218+
# recreate keychain
219+
sh("security delete-keychain #{kc.name}", error_callback: ->(result) { })
220+
sh("security create-keychain -p #{kc.pass} #{kc.name}")
221+
sh("security set-keychain-settings -t 3600 -l #{kc.name}")
222+
sh("security unlock-keychain -p #{kc.pass} #{kc.name}")
223+
sh("security list-keychains -d user -s login.keychain #{kc.name}")
224+
218225
match(
219226
type: 'appstore',
220227
readonly: true,
@@ -224,6 +231,12 @@ platform :ios do
224231
keychain_password: kc.pass
225232
)
226233

234+
# Fix certificate access permissions
235+
sh("security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k #{kc.pass} #{kc.name}")
236+
237+
# Debug
238+
sh("security find-identity -v -p codesigning #{kc.name}")
239+
227240
build_ios_app(
228241
scheme: 'StatusIm',
229242
workspace: 'ios/StatusIm.xcworkspace',

0 commit comments

Comments
 (0)