Swift: Thread 1 signal SIGABRT - ios

After upgrading Xcode from 5 to 6 beta, almost every project gives me an unexpected error after running the application. There are some other posts with this title but the error is different.
In AppDelegate.swift, sometimes the simulator goes completely black, without the error, sometimes it gives me the error on this line:
class AppDelegate: UIResponder, UIApplicationDelegate {
In Xcode 5 I didn't had this error before, with Deployment Target set to 7.0 or 7.1.
Thanks in advance.

This error is caused when you have 2 or more of the same IBOutlets or IBActions in your main.storyboard inspector (right arrow key at the very end of your options). Find out where there is double, and delete the one you don't need! It should work perfectly fine after that.

Seems like there was a bug with iOS 7.1 as target.
Running tests on devices with iOS 7.1 installed now works. (17028705)
Try it again with the beta 2 update

I found this issue happened when I linked #IBOutlet/#IBAction and the linkage broke (renaming for instance). In the main.storyboard inspector, right click (control click) on the elements and delete any bad linkages. Should fix the error if that's the issue.
(Xcode 7)

fix my problem:
Go to deployment info and in "Main interface" select your correct storyboard...
Rerun app.

My issues with this started after I installed the legacy simulators (iOS7.1) under 'More Simulators' under the simulator build target. Xcode 6 and its native simulator had been running fine until then. What fixed it for me was to close Xcode, delete Derived Data, and under iOS Simulator in the simulator application choose "Reset Content and Settings" then restart the system.

I'm new to the coding world but resolved the painstacking problem. I was getting the same error by doing something and even though i deleted everything around that i couldn't resolve it. It was still giving me the same error, which meant that it is not deleting in some file it stores. Took me a while to figure out which file, finally when i opened the Mainstoryboard as source file, and did search on the error key word which i knew i changed, it gave me the lines it was sitting in. After deleting those lines error got fixed. I know basic HTML so i knew which lines to delete.
I cannot start my project all over again everytime i have this error so i had to find the solution and there was no solution i could find. So i had to do it myself with common sense, as i said i have no knowledge of coding.
Hope it helps.

I know there's already plenty of answers but just to note what happened in my case:
I created the ViewController on the storyboard first and then I created the class, I don't know why this was an error because both class names where identical, but by rewriting the class name on the storyboard helped to "link" correctly the view controller and its file. First create file then ViewController on storyboard to prevent this error.

Related

The file “MyApp” couldn’t be opened because you don’t have permission to view it error (Xcode 11)

I am currently developing an app using Xcode 11 and I am confused by the root of error message I am receiving when I try to build my app to run in the simulator. I have tried for hours to resolve this, using different tutorials I found on Stack Overflow but really haven't had any luck due to the fact most of the time these issues were reported for Xcode 11. The last time I had the software open, it ran totally fine so I'm very confused what changed since I last saved the project. If you can please help give some, that would be greatly appreciated. I have also attached an image of the error.
What I Have Already Tried
Cleaned the build folder
Manually cleaned the Derived Data folder
Raised the permissions of the executable within Finder
Check to make sure that the compiler is set to default in build options
Checked the info.plist and updated the executable file to ${EXECUTABLE_NAME}
Changed my derived data folder to another location
Deleted manually added folders
Restarted Xcode
Restarted my computer
Image of error as it appears on Xcode:
It appears that it's an iOS app, correct? With everything else you mentioned trying, there might be an issue with the simulator, so you could try running in a different simulator or resetting the current one to default settings. I've attached a screenshot and you can find this under the "Hardware" menu in the simulator. Note that it will delete all installed apps in the simulator.
I realized my issue was with a swift file that I made that was corrupted. The file was linked to a view controller and the view controller works fine but the class file was fully corrupted and would even make Xcode crash if I tried to open the file.
Tips for people who have the same issue:
Read through all the errors and find the specific file thats causing the issue. Usually the issue stems from dependency files but if you're lucky like me then its a simple fix

Why Xcode shows "This app could not be installed at this time." pop-up?

When I run the project and add the app in simulator for the first time, everything is okay. But when I run it again, Xcode prompts this message as a pop-up window at the end of compilation:
This app could not be installed at this time.
I already checked the relevant question, and tried all the advised ways to solve this issue; checking mentioned logs, cleaning project, restarting simulator, changing it, erasing all content and settings in it. Nothing works. I must erase the app and recompile it every time to open the app. Did you get the same message before? Is there any way to detect problem and resolve it? Btw, I use Xcode 9.2 at High Sierra.
This error pop-up may come up for different reasons. There is no specific reason to see it for now. In my case, a JSON file that I added to Bundle in order to provide mock data triggered this issue. This file was containing a Turkish letter in one of the keys. After I fix it, the pop-up is gone. Interestingly, earlier simulators (<=9.1) work properly if JSON file contains Turkish letter but 9.2 simulators cannot tolerate it.
Worked for me when I rebuild the project after deleting the derived data folder.
I think I may have found a solution. This all started a short time after I let Xcode update my project settings. Specifically on my CocoaPod-Subproject. I removed the pods and reinstalled them and now I am no longer getting the pop-up.

Xcode stops autocompleting, UIKit classes not available

The topic has raised several times within the last weeks. Till now I haven't found a proper solution. Is it just a momentary Xcode bug or is there more behind it?
Scenario:
In one of my projects autocompletion has stopped working when I last opened it. Other projects are not affected. It looks kind of reasonable that once this problem is around, I also can't cmd+click the different classes imported by UIKit anymore like UIViewController or protocols like UITableViewDataSource within this particular project. An error pops up "Symbol Not Found". So in a way, even though it is working fine when running the app, it is just not available from inside the files.
Restarting Xcode, deleting derived data etc. hasn't brought me any further so far.
Any ideas? Or - like mentioned - really nothing else than just a bug?
I don't know which part exactly was the key issue but
Installing Xcode 6.1
Downloading iOS 8 libraries & Xcode 6 libraries within Preferences
solved the problem.
Setting active scheme works for me.
You have to select proper device corresponding to your installed components.
XCode 6.1 has iOS8 primary, so you have to select iPhone6 or Resizable iPhone, if you select iPhone5 it couldn't find it.
(project name>device) on the right of the 'Stop running' button

Getting an error trying to unwind from a segue [duplicate]

At build and run (in simulator and on my iPhone) im now getting the following from xcode and the app never launches... however if i stop the build in xcode and then open the app it seems fine?
UPDATE: Yes the breakpoint of course was causing the app to pause (i had forgot to remove it before posting)
The issue is with importing and using a custom font. If i remove the imported TTF and where i added its reference in my plist things are fine. At least I now know its the font thats the issue
Try this:
Then run it again...

Xcode Crashes when adding UIViewController in Interface Builder

I was in Xcode and I went to edit a nib file. I tried to drag on a UIViewController from the objects library, but as soon as I did Xcode crashed. I had never had this problem before, but now I cannot add a UIViewController to the nib file (the problem persists for other files in the same project and other files in other projects).
Originally, the problem occurred in the Developer Beta of Xcode 4.5 that I was using, but now when I tried in the old version of Xcode the problem was there also.
Basically, I have been unable to find a way to get this problem to stop. If anyone has experienced this problem or knows how to fix it, that would be so great.
Thanks,
Luke
What about trying to delete all Xcode preferences files? It seems like the latest Xcode beta broke something there...
Have a look at the following folders:
/Users/xyz/Library/Application Support/Developer/Shared/Xcode
/Users/xyz/Library/Application Support/Xcode
/Users/xyz/Library/Developer/Xcode
/Users/xyz/Library/Caches/com.apple.dt.Xcode

Resources