2017-09-20 66 views
1

當我存檔爲App Store的項目,我有一個錯誤分割故障11 1.在運行通#317780 SILFunctionTransform「」合併SIL結合通過窺孔優化SIL說明在斯威夫特4

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

但是沒有建立時間的設備或錯誤模擬器。我該如何解決它?

回答

1

我認爲這不是最優化的解決方案,但它對我有幫助。

在項目設置中,我選擇了目標MyApp - > Build Settings - > Optimization Level - > Release None [-Onone]。

我想創造蘋果一個bug報告,因爲這個代碼是從Chatto framework,我也沒打算。