Skip to content

Commit bd41537

Browse files
committed
x
Signed-off-by: Jakub Sokołowski <[email protected]>
1 parent 5208d60 commit bd41537

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

fastlane/Fastfile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ class Keychain
7474
lock_after_timeout: true,
7575
timeout: 1500
7676
)
77-
# Fix certificate access permissions
78-
Fastlane::Actions.sh("security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k #{pass} #{@name}")
7977
end
8078
end
8179

@@ -118,6 +116,9 @@ def build_ios_adhoc(readonly: false, pr_build: false)
118116
keychain_password: kc.pass
119117
)
120118

119+
# Fix certificate access permissions
120+
sh("security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k #{kc.pass} #{kc.name}")
121+
121122
build_ios_app(
122123
scheme: scheme,
123124
workspace: 'ios/StatusIm.xcworkspace',
@@ -217,6 +218,13 @@ platform :ios do
217218
lane :release do
218219
kc = Keychain.new('fastlane')
219220

221+
# recreate keychain
222+
sh("security delete-keychain #{kc.name}", error_callback: ->(result) { })
223+
sh("security create-keychain -p #{kc.pass} #{kc.name}")
224+
sh("security set-keychain-settings -t 3600 -l #{kc.name}")
225+
sh("security unlock-keychain -p #{kc.pass} #{kc.name}")
226+
sh("security list-keychains -d user -s login.keychain #{kc.name}")
227+
220228
match(
221229
type: 'appstore',
222230
readonly: true,
@@ -226,6 +234,12 @@ platform :ios do
226234
keychain_password: kc.pass
227235
)
228236

237+
# Fix certificate access permissions
238+
sh("security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k #{kc.pass} #{kc.name}")
239+
240+
# Debug
241+
sh("security find-identity -v -p codesigning #{kc.name}")
242+
229243
build_ios_app(
230244
scheme: 'StatusIm',
231245
workspace: 'ios/StatusIm.xcworkspace',

0 commit comments

Comments
 (0)