6

enter image description hereUsing Fastlane with azure pipeline Build getting a freeze at Running script '[CP] Embed Pods Frameworks we aren't able to do further action on the build as it gets stuck on given a run script Error:https://ibb.co/qFbqqfz

Also, raise the same query at https://github.com/fastlane/fastlane/issues/15290

Siddharth Shah
  • 382
  • 4
  • 22
  • 2
    Hi @SiddharthShah, Since you have got the solution from Github, do you mind convert it as answer then mark it? Thus it could help other SO users refer to it;-) – Mengdi Liang Sep 16 '19 at 11:17
  • 1
    Hi @SiddharthShah, could you do what Merlin suggests? I don't really understand what you mean by your GitHub comment :(. Thanks! – David May 24 '20 at 02:17

2 Answers2

1

Alright after some digging I've found the solution. My CI server was Travis, not Azure though.

With this setup you need to stop using Automatic code signing and select the match provisioning profile in your project settings.

Modify your Fastfile as follows:

before_all do |lane, options|
    ENV["MATCH_KEYCHAIN_NAME"] = "travis-ci"
    ENV["MATCH_KEYCHAIN_PASSWORD"] = ENV["MATCH_KEYCHAIN_NAME"]
end

Insert create_keychain before calling sync_code_signing (a.k.a match).

create_keychain(
    name: ENV["MATCH_KEYCHAIN_NAME"],
    password: ENV["MATCH_KEYCHAIN_PASSWORD"],
    default_keychain: true,
    unlock: true,
    timeout: 3600,
    add_to_search_list: true
)
sync_code_signing(
    readonly: true,
    keychain_name: ENV["MATCH_KEYCHAIN_NAME"],
    keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"]
)

Finally, remove the keychain with delete_keychain whenever appropriate, e.g. at the end of the lane.

Enjoy :)

David
  • 2,109
  • 1
  • 22
  • 27
0

I fixed this issue only updated create_keychain like this:

create_keychain({
    name: ENV["MATCH_KEYCHAIN_NAME"],
    password: ENV["MATCH_KEYCHAIN_PASSWORD"],
    default_keychain: true,
    unlock: true,
    timeout: 3600,
    add_to_search_list: true
})