简体   繁体   中英

Archive Export error: The archive contains nothing that can be signed

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 there may be more information needed. Please ask and I will provide what I can.

What fixed my issue was including arm64 in the app architecture,

In your Target -> Build Settings search for:

  1. VALID_ARCHS and make sure arm64 is included.
  2. search for Excluded Architectures and make sure arm64 is NOT mentioned there.

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.

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.

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.

I had similar error when I was resolving error occurred after shifting from Intel based mac to M1 based mac for a ReactNative based project. For resolving some fixes, I had to exclude the arm64 in the project build settings, but I also excluded it in the target. I removed the "arm64" from all schemes of the excluded targets of Excluded Architectures of the project target and rebuilt the code. It worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM