Xcode error with exit code 254

I was looking for a solution, but did not find anything. Withe beta 3 Xcode 6 my code no longer works. Xcode returns me this error:

When issuing SIL for 'tableView' in /Users/Marco/Desktop/iPrescription/iPrescription/MedicineTableViewController.swift:109:14: 0: error: unable to execute command: segmentation error: 11: 0: error: swift frontend command failed from -for signal (use -v to see the call) The command / Applications / Xcode 6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 254

I am new to ios programming and I don’t know what to do to find the origin of this problem. I am very upset because I do not know what I am looking for.

+7
segmentation-fault ios swift xcode6 compiler-errors
source share
1 answer

Same issue for me, but with a collection view in my case. I found this to be caused by the line:

let cell = collectionView?.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as CustomCell 

I just changed it to:

 let cell = collectionView!.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as CustomCell 

and my application comes back to life again. Still don't know why.

UPDATE:

Just noticed that the method signature is changed in beta3 and collectionView (in tableView in your case), we are forced to expand:

 override func collectionView(collectionView: UICollectionView**!**, cellForItemAtIndexPath indexPath: NSIndexPath!) -> UICollectionViewCell! 

therefore, we need to fix the data source methods and use collectionView or tableView directly.

+3
source share

All Articles