My error is really as simple as the title says. I am trying to import a specific module, called IBAnimatable
. the statement works just fine in one file, and Xcode does not give me any complaints at all, however while doing the exact same thing again in another file, it suddenly starts to complain. I have tried cleaning the project and building it again multiple times. I cannot understand why this is happening at all. This error merely just randomly showed up after trying to build the project. There were not edits done to that file, and it was previously working. The code for the working file with the import, and the file which doesn't work are down below.
This is the code of the file which isnt working, it was giving the error that No such module 'IBAnimatable'
import UIKit
import IBAnimatable
class ContactsTableViewCell: UITableViewCell {
@IBOutlet var username: UILabel!
@IBOutlet var profilePic: AnimatableImageView!
}
Yet while it gives me that error, this code builds just fine in another file:
import UIKit
import IBAnimatable
class FavoriteTableViewCell: UITableViewCell {
@IBOutlet var profilePic: AnimatableImageView!
@IBOutlet var username: UILabel!
}
I don't know if this holds any significance to this error, but previously today I have changed the name of the app too, however I was able to build and run the app with both of these files being the exact same as you see them now. I have also recently turned on push notifications on the app, however even after doing this these two files were building and running just fine. This error really did just randomly show up, and while dealing with xcode for a decent amount of time, I simply thought cleaning it and building it again would fix it however, this was not the case.
Edit: A restart of Xcode also did not fix the problem.
Edit 2: Clearing derived data did not help either.
Edit 3: I don't know if this is important, but I commonly am starting to get the error Command CompileSwift failed with a nonzero exit code
, but upon building the project multiple times as shown in the first answer here: Build fails with "Command failed with a nonzero exit code", that error was fixed, however the other error remained.