Question: I was trying to use mongoose getter to cast all user password before send out. It works perfectly.
However, on method "comparePassword", I need the passwordstring to compare sothen I can authenticate.

Is there a way to bypass the getter under certain conditions in mongoose? Thanks in advance! 

Code Example:

```
function castpassword (pw) {
  return 'keyboard cat';
}

var AccountSchema = new Schema({
  password: { type: String, get: castpassword }
});

AccountSchema.methods.comparePassword = function (candidatePassword, cb) {
    // random hash vs keyborad cat === not authenticated
    crypt.compare(candidatePassword, this.password, function (err, isMatch) {
        if (err) return cb(err);
        cb(null, isMatch);
    });
};
....

Account.findById( someId, function (err, found) {
  console.log(found.password); // 'keyboard cat'
});

```

Answer: 
The reason for the issue is, some how `FTALDeviceDetailsViewController.m` file is ended up `Copy Bundle Resources` causing this is be treated as separate target. 
When I delete the file from the Copy Bundle Resource, every thing worked as expected.

Now the mystery questions to me, what are .d .dia generated? This is up for further study.
I faced this too, and trying to find something wrong with the copy bundle resources, as the previous answers, I found a folder being copied, removing it solved the problem.