嘗試在RELEASE
配置中構建應用程序時出現以下錯誤。當我在DEBUG
模式下構建相同的應用程序時,似乎所有工作都正常。RELEASE配置中的UIStoryboard'init(name:bundle)'問題
UIStoryboard 'init(name:bundle)' is unavailable: Use object construction' UIStoryboard(name:bundle)' 'init(name:bundle)' has been explicitly marked unavailable here.
我確定在RELEASE配置中,相同的代碼幾天後運行良好(沒有任何錯誤)。
這裏是拋出錯誤的行:我在Xcode版本8.3.3 (8E3004b)編寫本
let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main)
。
謝謝。
這裏AnyObject的整個使用是可疑的。誠然,錯誤是令人困惑的,但你永遠不應該這樣做,你仍然不應該這樣做。 – matt