问题
My app runs on devices and simulators. The app archives with no errors. When I try to export I get the following error:
The log file IDEDistribution.critical.log
contains the following:
2017-07-07 07:40:03 +0000 [MT] Failed to generate distribution items with error: Error Domain=IDEDistributionErrorDomain Code=12 "The archive contains nothing that can be signed." UserInfo={NSLocalizedDescription=The archive contains nothing that can be signed., NSLocalizedRecoverySuggestion=Verify that your build process has compiled binaries and copied in bundled resources.} 2017-07-07 07:40:03 +0000 [MT] Presenting: Error Domain=IDEDistributionErrorDomain Code=12 "The archive contains nothing that can be signed." UserInfo={NSLocalizedDescription=The archive contains nothing that can be signed., NSLocalizedRecoverySuggestion=Verify that your build process has compiled binaries and copied in bundled resources.}
The contents of the .xcarchive
:
The .app
also contains all the usual stuff.
I am sure the is even more information needed. Please ask and I will provide what I can.
回答1:
Change the archive destination directory to a location on the local SSD (and not an external HDD).
I have not had this problem again after I did this and I recall having started running into the problem after I started trying to free up space on my mac.
回答2:
At last! There may have been other issues too, but only after I changed the scheme container was I able to export. And I knew it had something to do with CocoaPods.
Before pod install
your scheme may look something like this:
There are no other container options.
After pod install
it will look like this:
Once I selected the Workspace
container I started seeing a difference in the build and consequently the export worked.
回答3:
For me helped relaunching an Xcode. I think the problem is because all archives stored in a separate HDD and it was something with the access to it by Xcode.
来源:https://stackoverflow.com/questions/44966406/archive-export-error-the-archive-contains-nothing-that-can-be-signed