Xcode Error problem

Dear,


Maby it is because I started a week ago using Xcode but there i something not right...


The moment I start a project using Xcode the app already has 5 different error's. So in default there are several problems with the app. When I try to fix the problems the error messages still appear on the error screen en every time i try to fix it a new one appears. Also when i try to add a code the same way as the guy who gives tutorials on youtube there appear some errors. Yes i looked if he has the same software build and if he uses the newest version of swift. I hope sombody can help me with it.


Kind Regards,


Kevin Vonk

Accepted Reply

Its default so didn't edit enything...

(as you can see in the screenshot below)

just opened a project and went to main story board.

https://prnt.sc/kucsqv

Replies

Sorry here the screenshot. https://prnt.sc/ksn73f

You need to provide more information for anyone to be able to help you. At a minimum you should provide the following information:


  • The version of Xcode you are using.
  • The type of Xcode project you are creating.
  • The error messages you are getting.


It would also help if you mentioned who "the guy who gives tutorials on youtube" is and the tutorial you are following. There are a lot of people on YouTube who have programming tutorials and a lot of tutorials.


What you are seeing is unusual behavior. If you create a new project in Xcode and build it, there should be no errors.

Instead of discussing what you do not get, you'd better:

- show the code

- tell exactly where the error is

- provide the exact error message you get

>I started a week ago


Help yourself gain traction, and speed replies, by helping others - see For Best Results - Read the Label

For the first error:

- you have defined a tableView with a prototype cell

- You have not defined the reuse identifier for the UITableViewCell in Interface builder, hence the warning


For the second:

- look at your storyboard

- you probably have no arrow, entering in the RootViewController

- to correct, either set this RootViewController as the initial controller in the storyboard (inpector panel) or make sure there is a segue pointing to it


Same for the third, with navigation controller

Dear szmczyk,


The thing i don't get is when i start an default app there already 5 different errors. I now what the errors mean and how to fix it but by fixing the problem an other one appears. I also tried making a login page using the follwing code. I was using a tutorial and typed the exact same thing as the instructor. (see photos) The code he was writing was good and no errors were found. I did the exact same thing at the same place as he dit and almost all code's i was typing were wrong... Also I wanted to make a Terms Of Use icon and the same problem appeared. I hope somebody can help me with the thing(s) i'm doing wrong..


Kind Regards,


Kevin


}

override func viewDidAppear(animated: Bool)

{

self.performSegue(withIdentifier: "Login_Pagina ", sender: self?)

}


}

@IBAction func chekboxtapped (_ sender: UIButton){

if sender.isSelected {

sender.isSelected = false

} else {

sender.isSelected = true

}



}



im using the newest default swift ithink swift 4.x

Im using Xcode Version 9.4.1 (9F2000)

Im using a single page app.

the errors im getting:

Een Snel Alternatief Group

Unsupported Configuration Group

/Users/kevin-vonk/Desktop/Een Snel Alternatief/Een Snel Alternatief/Base.lproj/Main.storyboard:7: Prototype table cells must have reuse identifiers

/Users/kevin-vonk/Desktop/Een Snel Alternatief/Een Snel Alternatief/Base.lproj/Main.storyboard: “Root View Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:].

/Users/kevin-vonk/Desktop/Een Snel Alternatief/Een Snel Alternatief/Base.lproj/Main.storyboard: “Navigation Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:].

/Users/kevin-vonk/Desktop/Een Snel Alternatief/Een Snel Alternatief/Base.lproj/Main.storyboard: Prototype table cells must have reuse identifiers

/Users/kevin-vonk/Desktop/Een Snel Alternatief/Een Snel Alternatief/Base.lproj/Main.storyboard: “View Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:].




--screenshots--

https://prnt.sc/ktvtk5

https://prnt.sc/ktvvx6

https://prnt.sc/ktvw98

https://prnt.sc/ktvwh9

http://prntscr.com/ktvwu2 (the screenshot of the tutorial also using newest swift)

https://prnt.sc/ktvx1e

I cannot reproduce the issue you see on new projects. When I create an iOS Single View App project in Xcode 9.4.1 and Xcode 10 and click the Run button, I get no errors or warnings.


Regarding the errors you have following the tutorial, I recommend contacting the person who created the tutorial. He knows more about the tutorial than the people on this forum and will be more able to help you.

some errors detected on the fly:


    override func viewDidAppear(animated: Bool)
    {
        self.performSegue(withIdentifier: "Login_Pagina ", sender: self?)
    }

}
@IBAction func chekboxtapped (_ sender: UIButton){
    if sender.isSelected {
        sender.isSelected = false
    } else {
        sender.isSelected = true
    }


line 3: self? is not correct ; should be self


You have function names that start with uppercase. That is not correct (even though it does not cause error) by swift conventions.


On second screenShot, identifier : Login

it should be identiofier : "Login"


I do question that you copied exactly the tutorial. You think you did, but in code, every detail is important.

Well thats the main reson i made this post on the forum.. I don't know whats happening but now the error stays the same even when i connect the arrow to an other page. So how to reinstall Xcode ? Can't find the option to delete the program...

Don't think the errors are in XCode. More likely, in your code.


See my post dated Sep 13, 2018 12:12 PM

Its default so didn't edit enything...

(as you can see in the screenshot below)

just opened a project and went to main story board.

https://prnt.sc/kucsqv

Xcode is like any other Mac app. You delete it by moving it to the Trash.


After you delete Xcode you can reinstall it from the Mac App Store or from the developer site


https://developer.apple.com/xcode/

ould you detail very precisely what you do:

- You create a completely new project ?

- What type of project is it ? SingleView ?

- Then you get the error without entering any code, just using the template ?

- Messages are just as if you had a navigation controller. Could you show the Project Navigator pane, to see which files were created ?

- You create a completely new project ? Yes

- What type of project is it ? SingleView ? Yes

- Then you get the error without entering any code, just using the template ? Yes

- Messages are just as if you had a navigation controller. Could you show the Project Navigator pane, to see which files were created ?

sure : http://prntscr.com/kvagn6

Just downloaded xcode 10 and now everything is working as it is. Thx for the help!