I have a swift project in which i want to retrieve the name of the device and show in in a UITableViewCell
.
But when i want to call UIDevice.currentDevice()
in
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
the compiler fails with:
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
The following build commands failed:
CompileSwift normal arm64 "path to project folder"/custom_tableview_controller.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (2 failures)
The awkward thing is calling UIDevice.currentDevice()
in any other file than my custom_tableview_controller.swift
file is working.
Additional information:
- Xcode 6.4(6E35b)
- Debug