1

从 Xcode8.0 升级到 Xcode8.1 后,Braintree 的几个捆绑包的代码签名失败。

尝试了很多之后,无法找到任何解决方案。在这里我发布错误日志。

CodeSign /Users/Arvaan/Library/Developer/Xcode/DerivedData/InstaCare-bielwuzaqgqgngcpffjnjballruv/Build/Products/Debug-iphonesimulator/Braintree-Drop-In-Localization.bundle
cd /Users/Arvaan/Documents/BitBucket/iOS/2016/Xcode8_1/New/Instacare/Pods
export CODESIGN_ALLOCATE=/Applications/Xcode8_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode8_1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode8_1.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" 

Signing Identity:     "-"

/usr/bin/codesign --force --sign - --timestamp=none /Users/Arvaan/Library/Developer/Xcode/DerivedData/InstaCare-bielwuzaqgqgngcpffjnjballruv/Build/Products/Debug-iphonesimulator/Braintree-Drop-In-Localization.bundle

/Users/Arvaan/Library/Developer/Xcode/DerivedData/InstaCare-bielwuzaqgqgngcpffjnjballruv/Build/Products/Debug-iphonesimulator/Braintree-Drop-In-Localization.bundle: bundle format unrecognized, invalid, or unsuitable
Command /usr/bin/codesign failed with exit code 1

项目在设备上运行良好,还能够创建存档来分发它。但不适用于模拟器。

如果有人面临同样的问题,请帮助我。

4

1 回答 1

6

我从这个Apple Developer 论坛链接中得到了答案。这里也提出了很多解决方案,但对我有用的方法如下。

在导航中选择 Pods --> TARGETS --> your BundleName --> Signing(Enable Development Signing) --> Identity(Choose Info.plist File)。

  1. 首先在您的项目中选择 Pod(.xcworkspace)。
  2. 然后选择导致代码签名错误的捆绑包。就我而言Braintree-Drop-In-Localization.bundle,这Pods-InstaCare-Braintree-Braintree-Drop-In-Localization.bundle是两个导致错误的文件。

在此处输入图像描述

  1. 然后点击Choose Info.plist file按钮。它将显示如下所示的弹出窗口。

在此处输入图像描述

  1. 清理项目并运行。它也可以在模拟器上运行,也可以在设备上运行。
于 2016-11-30T06:31:47.437 回答