arslan2012
arslan2012

Reputation: 1028

Swift ViewController does not respond to -getFile, Could not connect action, target class

My code works all fine but there is always two console message every time I run it. app works fine but the messages just bugs me so much. Could anyone tell me what is wrong with my code and what does these console message means,thanks

2016-06-13 14:31:15.014 
LazyHackintoshGenerator[1625:37250] Could not connect action, target class 
LazyHackintoshGenerator.ViewController does not respond to -getFile:

Upvotes: 1

Views: 822

Answers (2)

  1. Select your ViewController.
  2. Right-click on its “View Controller” icon (the blue circle with a white square inside).
  3. Look for warning icons (yellow triangles).
  4. Hover over them. An explanation of the problem will appear. As Feldur said, the problem is probably a leftover link from your storyboard to a method that does not exist anymore (maybe you renamed it or deleted it manually). Remove the link by clicking on the cross, and, if needed, re-link to the appropriate method in your code.

Here is an example of what it will look like in Interface Builder.

Interface Builder screenshot

Upvotes: 3

Feldur
Feldur

Reputation: 1169

Likely a control's action in your storyboard is linked to a method getfile that no longer exists

Upvotes: 1

Related Questions