Reputation: 39460
I'm confused. I copied and pasted 3 files in Finder, then back into my xCode project. I've now tweaked the xib and made corresponding changes in the .h and .m files, but it seems like these three files aren't being compiled. Right now I have a blatantly obvious syntax error but xCode doesn't seem to care. I'm even able to run the app in the simulator.
I haven't actually refactored my existing code to use the new view controller, but that shouldn't matter, right? What is going on?
Upvotes: 0
Views: 110
Reputation: 4503
They are not being compiled yet.
In your Project Settings goto "Build Phases", "Compile Sources", then click the "+"
Add the .m files and they will then compile.
EDIT: To avoid the problem all together-- I realized when I was adding new files to my project, my project was unchecked in the add file dialog which was why it was not added to the Compiled Sources list. Checking that before adding prevents having to do it manually.
Upvotes: 5
Reputation: 3803
Just like to add one more step in @RyanG before compile try to clean your code from menu Product -> Clean.
Upvotes: 2