gpt4 book ai didi

swift - 通过 Swift 4 中的窥孔优化结合 SIL 指令

转载 作者:可可西里 更新时间:2023-11-01 02:01:00 26 4
gpt4 key购买 nike

当我为 App Store 归档项目时,出现错误 Segmentation fault 111. 运行时通过 #317780 SILFunctionTransform ""Combine SIL

Instructions via Peephole Optimization"" on SILFunction "@_T08myapp20ItchMessageViewModelC05photoC0AA0bcE8Protocol_pfgAA04ChatbcE0C_Tg5".
for getter for photoMessage at /Users/work/Desktop/myappProject/myappiOS/myapp/Groups/ChatGroup/ChatFactory/Bubbles/VideoBubble/Model/ItchMessageViewModel.swift:38:16

这段代码看起来像这样

open class ItchMessageViewModel<ItchMessageModelT: ItchMessageModelProtocol>: ItchMessageViewModelProtocol {

public var itchID: String
public var itchName: String

public var photoMessage: ItchMessageModelProtocol { **This is 38 line**
return self._itchMessage
}

public let _itchMessage: ItchMessageModelT
public var transferStatus: Observable<TransferStatus> = Observable(.idle)
public var transferProgress: Observable<Double> = Observable(0)
public var transferDirection: Observable<TransferDirection> = Observable(.download)
public var image: Observable<UIImage?>
open var imageSize: CGSize {
return self.photoMessage.imageSize
}
public let messageViewModel: MessageViewModelProtocol
open var showsFailedIcon: Bool {
return self.messageViewModel.showsFailedIcon || self.transferStatus.value == .failed
}

public init(itchMessage: ItchMessageModelT, messageViewModel: MessageViewModelProtocol) {
self._itchMessage = itchMessage
self.image = Observable(itchMessage.image)
self.messageViewModel = messageViewModel
self.itchName = itchMessage.itchName
self.itchID = itchMessage.itchID
}

open func willBeShown() {
// Need to declare empty. Otherwise subclass code won't execute (as of Xcode 7.2)
}

open func wasHidden() {
// Need to declare empty. Otherwise subclass code won't execute (as of Xcode 7.2)
}
}

但设备或错误模拟器没有构建时间。我该如何解决?

最佳答案

我认为这不是最佳解决方案,但它帮助了我。

在项目设置中,我选择了目标 MyApp -> Build Settings -> Optimization Level -> Release None [-Onone]。

我正在考虑为 Apple 创建错误报告,因为此代码来自 Chatto framework ,我也没打算。

关于swift - 通过 Swift 4 中的窥孔优化结合 SIL 指令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46327881/

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