Xcode Server Bot integration fails to export archi

2019-03-04 09:45发布

问题:

I have a build server setup with Xcode 7.2 and Server 5.0.15 so we can have CI. I'm able to create an Xcode Bot that creates an archive, but it's not able to finish the last step, which is exporting the ipa archive to the Server so it can be downloaded via ad hoc builds.

I'm able to create an archive from a local machine, but whenever I run a build bot using Distribution as the scheme, I get this error...

Bot Issue for TEST-BUILD-BOT-3 (build service warning)
Integration #8 of TEST-BUILD-BOT-3
Open in Xcode: xcbot://(null)/botID/fa5f2ef869edbde2181109e01843e862/integrationID/fa5f2ef869edbde2181109e01847dbb0

Assertion: exportArchive: ipatool failed with an exception: #<Errno::EEXIST: File exists - /var/folders/3x/8t3j9vnj48530fxd4g4djp14000087/T/ipatool20160318-45875-5xq2zz/MachOs/iphoneos/armv7/(dylibs)/libswiftContacts.dylib>
File: (null):(null)

Full logs for this integration are attached.

For one thing, I'm not sure where the full logs are attached (this error is shown in the Xcode build bot window).

Some information on my project:

  • The project consists of an app with three extensions (share photo, share safari and watch).
  • I'm using Cocoapods with some swift frameworks, so I'm using the use_frameworks! keyword in my podfile.

I've tried the following:

  • Made sure all targets (including pods) were using the Distribution certificate.
  • Tried w/ and w/o Bitcode enabled.

The worst part about trying to fix this issue is that the build bot takes 20-30 minutes each time I want to test some changes I made.

Any suggestions would be much appreciated!

回答1:

I had the same error, in the watchapp and watchapp extension targets, i changed the setting, under Build Settings

Embedded Content Contains Swift Code   No

And the error was gone

I found this technical post from apple that says any embedded content needs to be set to No to prevent multiple copies of the swift library being added. I interpreted that as a watch target would be embedded content, (not sure if thats what they meant)