After upgrading to xcode beta 6, the compile is suddenly exploding cryptically on me. I get no inline messages of any kind, just this error in the build log.
Undefined symbols for architecture i386:
"__TFSs15_arrayForceCastU___FGSaQ__GSaQ0__", referenced from:
__TFC9MyProj6NavBar5stackfS0_FCSo20CDVInvokedUrlCommandT_ in NavBar.o
I managed to trace it down to this line of code, which worked fine on beta 5.
// A dictionary of String keys and arrays of NavBarItem instances as values.
var stacks: [String:[NavBarItem]] = [:]
func stack(cmd: CDVInvokedUrlCommand) {
let stackName: String = cmd.arguments[0] as String
if let stack = stacks[stackName] {
// When I comment this line out I get a clean compile.
navBar.setItems(stack, animated: false)
}
}
My only guess is that it doesn't like be converting from a swift array to an NSArray
somehow. Any ideas?
I got this error even with the new version of Beta6 that was release hours after the bad one got pulled.
There are some significant changes in Beta 6 and looks like Xcode is getting confused. A full clean didn't work either.
I've solved this and other similarly illegible errors by deleting the contents of the Derived folder. You can find where that folder is located by going to Preferences > Locations.
The default path is: /Users/[your username]/Library/Developer/Xcode/DerivedData
Launch Organizer and then hit the Delete button as shown below. Rebuild and the error will go away.
I had the error. Sometimes Xcode has such problems. But with the app 'Watchdog' (available in the App Store), it did never happen again.
So Watchdog also solved this error for me. I think it did the same as @Paul Ardeleanu did manually.
Link to Mac App Store
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With