Muh*_*een 5 generics ios type-alias swift xcode10
在Xcode 10上存档时出现分段错误
注意:
我的代码:
typealias ResponseBlock<T> = (_ sender: T) -> Void
Run Code Online (Sandbox Code Playgroud)
我在整个项目中使用它,如:
var callback: ResponseBlock<AnyObject>?
Run Code Online (Sandbox Code Playgroud)
在Xcode 10上存档时出错:
用法:
var refreshCells: ResponseBlock<[IndexPath]>?
viewModel.refreshCells = {indexPathList in
self.collectionView.reloadItems(at: indexPathList)
}
Run Code Online (Sandbox Code Playgroud)
我注意到 XCODE 10 Archive 处于发布模式和构建,运行处于调试模式。
所以我检查了发布和调试模式配置之间的区别
它解决了我的问题,现在不再收到分段错误。