ios - UIStoryboard 'init(name:bundle)' issue in RELEASE config -
i'm seeing following error when trying build app in release
configuration. seems working fine when build same app in debug
mode.
uistoryboard 'init(name:bundle)' unavailable: use object construction' uistoryboard(name:bundle)' 'init(name:bundle)' has been explicitly marked unavailable here.
i'm sure same code running fine few days (without error) in release config.
here line throwing error:
let storyboard = uistoryboard(name: "main", bundle: bundle.main)
i'm compiling in xcode version 8.3.3 (8e3004b).
thank you.
it seems xcode or swift compiler bug. there error in project (only in release config)
filteredfavoritelist = searchtext.isempty ? [] : favoritelist.filter({(report: anyobject) -> bool in return report.reporttitle.localizedcaseinsensitivecontains(searchtext) })
as "report" of type anyobject not have property "reporttitle", piece of code throwing error in relese config (it working in debug config though).
i put below fix below:
filteredfavoritelist = searchtext.isempty ? [] : favoritelist.filter({(report: anyobject) -> bool in if let report = report as? myclass{ return report.reporttitle.localizedcaseinsensitivecontains(searchtext) }else{ return false } })
and there no more uistoryboard errors , i'm able build app in release config.
so there no error in line throwing error here due other reasons/errors.. strange true.
let storyboard = uistoryboard(name: "main", bundle: bundle.main)
thank you.
Comments
Post a Comment