IOS codesign error when export ipa from archive on Xcode8

Xcdoe version: Version 8.0 (8A218a), and I compile code using Swift2.3.

I want upload to app to app strore, build archive is succesed, but When I click "validate" or "Export" on the archive, I got this error:

An error occurred during validation
Codesign failed


The I click the "show logs" button , I can see these logs:

1. IDEDistribution.critical.log

2016-11-12 05:08:29 +0000 [MT] Presenting: Error Domain=IDEFoundationErrorDomain Code=1 "Codesign failed" UserInfo={NSLocalizedDescription=Codesign failed}


2. IDEDistribution.standard.log

invalid resource directory (directory or signature have been modified)

" invalid resource directory (directory or signature have been modified)", This is a important message I think.

It seems the error is occur when codesign the framwork. I'm sure I'm using right certificates.

sorry, the error log in IDEDistribution.standard.log:


/var/folders/2m//T/XcodeDistPipeline./Root/Payload/.app/PlugIns/tunnelprovider.appex/NEKit.framework: replacing existing signature

/var/folders/2m//T/XcodeDistPipeline./Root/Payload/.app/PlugIns/tunnelprovider.appex/NEKit.framework: invalid resource directory (directory or signature have been modified)

/usr/bin/codesign exited with 1

>Xcdoe version: Version 8.0 (8A218a),


You should at least be using Xcode 8.1 Release (8B62) 10.27.16, I think.

IOS codesign error when export ipa from archive on Xcode8
 
 
Q