Could not insert new outlet? [duplicate] - ios

This question already has answers here:
Xcode 4: Creating a UIView xib, not properly connecting
(33 answers)
Could not insert new outlet connection [duplicate]
(9 answers)
Closed 9 years ago.
I have just recently begun learning about app development, although I am quite fluent in Java, C and Fortran. I want to make a simple iOS app that just prompts the user to input their name, and when they hit a button a label says Hi [insert name]. I believe I'm going about this the right way although every time I try to link the label to my viewcontroller.h file it gives me this error. I hav gone through so many forums online with people saying they fixed it by deleting the derived data, restarting, reinstalling and what not. I have tried all of those numerous times. I've even uninstalled and reinstalled xcode twice. I was wondering if there are any other problems that could be causing this?
It looks very similar to this:
Thanks

1. Close your project.
2. Delete the DerivedData folder of you project. (project's folder, or inside
~/Library/Developer/XCode/DerivedData/(your project)/ ) or somewhere
else that were setup by you.
3. restart your project.
Otherwise make sure Have checked the target when you created your
second view controller

Just try that delete your secondviewcontroller and then recreate it.

Related

Xcode saves my old codes whenever i selected core data and i cannot get rid of it in swiftUI

So i'm having trouble with trying to open xcode with core data checked.
everytime i do it my old file from years ago suddenly shows up with all the old codes attached and my core data already filled in with that previous attemp. i have tried everything from deleting xcode to deleting my files but i cannot understand where and how xcode saves that old codes and keeps popping it up again and again everytime i clicked that core data check mark. i don't know if its a cache thing because i saw you can delete xcode cache but you have to download some software and i believe apple probably has some built in thing to avoid this. i'm using xcode 13.2.1 please help i've been trying and wrapping my heads around this problem for sometime i can;t seem to find the right answer for it. i have tried to delete xcode profiles like in this article https://cocoacasts.com/how-to-delete-every-record-of-a-core-data-entity
even this https://www.advancedswift.com/batch-delete-everything-core-data-swift/#delete-everything-delete-all-objects-reset-core-data
i still don't understand how to delete them all or where the code should be placed
Thank you so much for your time and have an amazing day/evening

Why is my storyboard not working properly?

I am building an app right now and using storyboards for the user interface. Storyboards were working great until about a week ago. Suddenly, they began to give me trouble. I posted a couple of Stack Overflow question regarding issues about storyboards. I have been experiencing all of the following issues:
Actions connect as AnyObject instead of Any when connecting them from storyboard.
I receive an error unrecognized selector sent to instance 0x7fb80e92bc00 due to objects not connecting from storyboard to source code.
Unwind Segues do not work. When I try to connect one, it doesn't even show any available.
I cannot select any of my UIViewControllers from the dropdown menu under the Identity inspector which I discussed more about in this question.
Inherit module from target does not get automatically selected in Interface Builder.
Here are the following things I have tried:
Clean the build folder.
Restart Xcode.
Restart my MacBook.
Delete derived data.
Tried a different storyboard.
Deleted some of the files that were giving me trouble (which is no longer an option as all files are giving me trouble).
New issues pop up everyday and it is getting more difficult to build my app when these issues occur. Why is this happening and is there any solution available?
I am facing the same issue in Xcode beta version. It generally facing when create new file. I resolved by following steps
Remove File reference
Add file again. (If file add with "copy" suffix, delete original file from source folder remove "copy" from file name)
Now try to connect with your reference, it will work

Xcode crashed when I open the main.storyboard, no matter if it's a new project or not [duplicate]

This question already has answers here:
swift : Failed to communicate with Interface Builder
(3 answers)
Closed 7 years ago.
I've searched on google for some time and can't find the answer to this problem of mine.
When I try to open the main.storyboard of any swift project, my xcode crashes, I can access the source code and all, just not the interface builder.
I get the error which can be seen in the pastebin link:
http://pastebin.com/URgBuPkV
Well, this looks like a bug in your Xcode.
I would recommend to simply de-install and then re-install Xcode.
Hope that helps :)

Xcode stalls on "loading" when trying to create new project

Xcode 6 never gets past "Loading" when I try to create a new project. I actually was able to create a new project yesterday, but I decided to just ditch it completely (deleted). Clearly there must be a bad file somewhere, possibly related to the project I deleted, since I also see the same stalling behavior now with Xcode 5.1, which has worked fine for creating new projects in the past. Xcode 6 has worked fine when starting with an already existing project and still appears to do so. I did not see this exact problem in your data base, though one person saw the project creation freeze before reaching the stage I get to. Their solution was to delete Xcode and every possible file related to it, which I'm a little squeamish about, since I don't want to affect existing projects, and don't have an understanding of what the various files are for.
Deleting the DerivedData of Xcode should fix the issue. You can do this by heading to ~/Library/Developer/XCode/DerivedData (with a Finder window open press cmd+G) and deleting all the subfolders of it.
This is embarrassing, but if it could happen to me, maybe it could happen to someone else. The problem was that the window that came up after the second step in defining the type of project to be created, the one in which you choose where to save the project's files, extended off the bottom of the screen, so that only the very tops of the buttons were visible. Eventually, I realized the one to the far right might be the one to click to continue. Which it was. Feel free to delete this question.

Xcode 6-Beta keeps crashing with a SourceKitService Terminated Editor functionality temporarily limited error [duplicate]

This question already has answers here:
SourceKitService Terminated
(34 answers)
Closed 8 years ago.
I have seen other questions with a similar problem but mine looks a bit more serious. Xcode keeps crashing on me. I have no chance to even edit a single character in my code. It is a very simple playground file with some basic code, nothing fancy. I'm not able to do anything at all in the current state.
When Xcode crashes, I hit reopen and the same thing happens again.
Locate the playground file using the Finder, then right click and select 'Show Package Content'. Next select the swift file, right click and open it using your favorite text editor (which must not be Xcode :)).
Once there, either delete its content or surround your code with comments. In the latter case, you can reopen the playground file in Xcode and selectively uncomment code line by line to know which line(s) cause Xcode to crash.
I've verified that there some recurrent patterns in code that almost always makes Xcode to crash, for example, when I use 2 or more custom operators in the same statement. I don't know if it that happens for all custom operators, or it's my specific implementation - either case, I know that I have to avoid that combination. You should take note when you notice a particular combination of code regularly making Xcode crash, and try to avoid it by splitting into multiply lines when possible.
Here's what I did to resolve it. I did reinstall Xcode a couple of times. It looks stable now but I'm not sure till when it would remain so. Looks like a bug to me. I will file it with Apple

Resources