5

I'm trying to get an iOS archive build to work on Travis CI, after having setup certs and private keys for signing without issues. All goes well until the point where signing occurs, at which point the build gets stuck, until travis CI kills it after timeout:

...
/usr/bin/codesign --force --sign 15E2916907037CFB777FC5F494A6CA252EF0895C  --preserve-metadata=identifier,entitlements "/Users/travis/build/RestComm/restcomm-ios-sdk/build/Build/Intermediates/ArchiveIntermediates/restcomm-olympus/InstallationBuildProductsLocation/Applications/restcomm-olympus.app/Frameworks/sofiasip.framework"

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself

At first I thought it was issue described here, so I added the -A flag in my 'security import ...' commands but to no avail.

Any hints?

Some more details:

  • I create a new keychain where I add Apple's cert, together with my development & distribution certs and private keys
  • I set that keychain as default and unlock it prior to any build action
  • Tried to use travis_wait to allow the codesign step to run for more than 10 minutes just in case, but still after 40 minutes it continued to be stuck. It's like it's waiting for some user input (in the UI maybe) that never arrives?

Thanks in advance, Antonis

Community
  • 1
  • 1
atsakiridis
  • 1,002
  • 5
  • 19

1 Answers1

5

I solved same problem by following steps that is described here.

https://github.com/travis-ci/travis-ci/issues/6791#issuecomment-261215038

a) change argument for all your security imports to keychain from -T to -A

security import ./scripts/certs/dist.cer -k ~/Library/Keychains/ios-build.keychain -A

b) after all imports execute command set-key-partition-list

security set-key-partition-list -S apple-tool:,apple: -s -k <keychainPass> <keychainName>

gm333
  • 136
  • 1
  • 10
  • 3
    Thanks Tueno, working like a charm! Out of curiosity and since set-key-partition-list isn't documented :(, any idea what it does? It seems to be modifying the certs somehow? – atsakiridis Dec 07 '16 at 10:47
  • I don't know the detail of what set-key-partition-list does, but according to radar, it overwrites partitionIDs in the certificates. http://www.openradar.me/28524119 – gm333 Dec 07 '16 at 11:57
  • It still works if you use -T /usr/bin/codesign, rather than the more permissive -A option. The important bit is the "set-key-partition-list" – BitByteDog Mar 21 '17 at 07:34