未定义的符号Swift.UnsafeMutableBufferPointer

Ost*_*ach 8 xcode ios swift swift3 xcode8

下载Xcode 8并迁移到Swift 3后,我无法再归档项目.同时,项目建立没有任何问题.

我得到的错误:

体系结构armv7的未定义符号:
"Swift.UnsafeMutableBufferPointer.(subscript.materializeForSet:(Swift.Int) - > A).(closure#1)",引自:Swift.UnsafeMutableBufferPointer的泛型特化的函数签名特化:Swift.MutableCollection在Swift和Swift.UnsafeMutableBufferPointer:Swift中的Swift.RandomAccessCollection> of Swift._siftDown(inout A,index:A.Index,subRange:Swift.Range,by:inout(A.Iterator.Element,A.Iterator.Element) - > Swift.Bool) - >()在OrderCoordinator.o函数签名中使用Swift.UnsafeMutableBufferPointer进行泛型特化:WSift中的Swift.MutableCollection和Swift.UnsafeMutableBufferPointer:Swift中的Swift.RandomAccessCollection> Swift._heapSort(inout A,subRange: Swift.Range,by:inout(A.Iterator.Element,A.Iterator.Element) - > Swift.Bool) - >()在OrderCoordinator.o函数签名中使用Swift.UnsafeMutableBufferPointer进行泛型特化:Swift.Mu swift和Swift.UnsafeMutableBufferPointer中的tableCollection:Swift中的Swift.RandomAccessCollection> Swift._partition(inout A,subRange:Swift.Range,by:inout(A.Iterator.Element,A.Iterator.Element) - > Swift.Bool) - > OrderCoordinator.o中的A.Index:未找到架构armv7 clang的符号:错误:链接器命令失败,退出代码为1(使用-v查看调用)

通过在以下函数中注释数组排序代码,我能够摆脱错误:

func didFinishWithResults(_ results: [PhotoProcessorResult]) {
    guard let album = albumService.currentAlbum else { return }
    //let sortedResults = results.sorted(by: { $0.fileIndex < $1.fileIndex })
    let updateItems = zip(sortedResults, album.assetItems).map { (photoProcessorResult, assetItem) -> UpdateItem in
        UpdateItem(path: photoProcessorResult.filePath, position: photoProcessorResult.fileIndex, isCover: assetItem.isCover)
    }
    albumService.updateAlbumWithItems(updateItems) { (success, errorDescription) in
        if success {
            self.handleAlbumUpdate()
        } else {
            self.showFailureAlert(errorDescription) {
                self.startProcessingAlbum(self.albumService.currentAlbum)
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

虽然我通过使用NSArray对数据进行排序来解决问题,但我不喜欢这个解决方案.

将不胜感激任何建议.

Ost*_*ach 1

更新到 XCode 8.1 后问题消失。感谢大家 :)