title: MCOMessageFlag in Swift
body: <p>I am trying to check message flags, in Swift but am not getting anywhere. I have been referring to this <a href="https://stackoverflow.com/questions/25388065/switch-statement-for-imported-ns-options-rawoptionsettype-in-swift">stackoverflow question</a> for help.</p>
  
  <p>Inside a <code>fetchMessagesOperationWithFolder</code> I am getting a selection of messages, seen, flagged, etc.. when I check them, no flags are reported</p>
  
  <pre><code>let requestKind = MCOIMAPMessagesRequestKind.Headers
  let uids = MCOIndexSet(range: MCORangeMake(1, UINT64_MAX))
  let folder = "INBOX"
  
  let fetchOperation = self.imapSession.fetchMessagesOperationWithFolder(folder, requestKind: requestKind, uids: uids)
  
  fetchOperation.start { (error, fetchedMessages, vanishedMessages) -&gt; Void in
      if (error != nil) {
          println("Error: \(error)")
      } else {
          for obj in fetchedMessages {
              if let message = obj as? MCOIMAPMessage {
  
                  let messageSeen = (message.flags &amp; MCOMessageFlag.Seen) != nil;
                  let messageFlagged = (message.flags &amp; MCOMessageFlag.Flagged) != nil;
  
                  if messageSeen {
                      println("Seen")
                  }
  
              }
          }
      }
  }
  </code></pre>
  
  <p>If I manually set the flags Seen and Flagged are printed as expected..</p>
  
  <pre><code>message.flags = MCOMessageFlag.Seen | MCOMessageFlag.Flagged
  
  let messageSeen = (message.flags &amp; MCOMessageFlag.Seen) != nil;
  let messageFlagged = (message.flags &amp; MCOMessageFlag.Flagged) != nil;
  
  if messageSeen {
      println("Seen")
  }
  ...
  </code></pre>
  
  <p>I am not sure what I am doing wrong, any pointers?</p>