I don't know if this is really the answer, but ...
I had the same problem. The application worked during creation / launch, but the archiving failed: "... swiftc failed with exit code 1", without any other useful message. Fortunately, when I tried to create my application with Nomad's ipa build , I got:
The following build commands failed: CompileSwift normal arm64 /path/to/erroneous/TableViewController.swift
So, I started commenting on sections of this file and tracked the problem until the tuple was assigned.
// MARK: - Table Data private var tableData: [(sectionName: String, item:ListItem)] = [] private func refreshTableData() { // let labor = ("Labor", laborListItem) // DOESN'T ARCHIVE let labor = (sectionName: "Labor", item: laborListItem) // ARCHIVES tableData = [labor] tableView.reloadData() }
Therefore, apparently, the compiler wanted the elements in thast tuple named (as defined by the tableData type) .. but only for archiving? The stupid thing is that I use the same template in other view managers, and the compiler seems to be okay with them.
For the record, my Code Generation -> Optimization Level was set to None for debugging and release.
Hope this helps someone! It took several hours to figure this out.
RyanM May 15, '15 at 1:59 2015-05-15 01:59
source share