gpt4 book ai didi

ios - undefined symbol Swift.UnsafeMutableBufferPointer

转载 作者:IT王子 更新时间:2023-10-29 05:52:25 44 4
gpt4 key购买 nike

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

我得到的错误:

Undefined symbols for architecture armv7:
"Swift.UnsafeMutableBufferPointer.(subscript.materializeForSet : (Swift.Int) -> A).(closure #1)", referenced from: function signature specialization of generic specialization with Swift.UnsafeMutableBufferPointer : Swift.MutableCollection in Swift and Swift.UnsafeMutableBufferPointer : Swift.RandomAccessCollection in Swift> of Swift._siftDown (inout A, index : A.Index, subRange : Swift.Range, by : inout (A.Iterator.Element, A.Iterator.Element) -> Swift.Bool) -> () in OrderCoordinator.o function signature specialization of generic specialization with Swift.UnsafeMutableBufferPointer : Swift.MutableCollection in Swift and Swift.UnsafeMutableBufferPointer : Swift.RandomAccessCollection in Swift> of Swift._heapSort (inout A, subRange : Swift.Range, by : inout (A.Iterator.Element, A.Iterator.Element) -> Swift.Bool) -> () in OrderCoordinator.o function signature specialization of generic specialization with Swift.UnsafeMutableBufferPointer : Swift.MutableCollection in Swift and Swift.UnsafeMutableBufferPointer : Swift.RandomAccessCollection in Swift> of Swift._partition (inout A, subRange : Swift.Range, by : inout (A.Iterator.Element, A.Iterator.Element) -> Swift.Bool) -> A.Index in OrderCoordinator.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

我能够通过在以下函数中注释数组排序代码来消除错误:

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)
}
}
}
}

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

如有任何建议,我们将不胜感激。

最佳答案

自编译以来,我认为您的代码没有任何问题。它显示“体系结构 armv7 的 undefined symbol ”并且无法存档这一事实告诉我您的项目正在发生某些事情,但不幸的是有很多方法会导致此问题。 arm7 是 iphone 5,所以您的项目可能只针对 arm64 正确设置。尝试此处提到的解决方案:Undefined symbols for architecture armv7

关于ios - undefined symbol Swift.UnsafeMutableBufferPointer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40151431/

44 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com