title: Swift CloudKit reading when not logged in to iCloud
body: <p>So I can read information from my database when (in the simulator) I'm logged into my iCloud, however, everyone who has my app will (obviously) not be. When I try to access database when Im not logged in, this error message appears: </p>
  
  <pre><code>&lt;CKError 0x7fc1e3416510: "Request Rate Limited" (7/2008); "This operation has been rate limited"; Retry after 3.0 seconds&gt; 
  </code></pre>
  
  <p>followed by: </p>
  
  <pre><code>Error Domain=NSCocoaErrorDomain Code=4097 "The operation couldn’t be completed. (Cocoa error 4097.)" (connection to service named com.apple.cloudd) UserInfo=0x7fc1e352f800 {NSDebugDescription=connection to service named com.apple.cloudd}
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>//VARIABLES********************************************************
  
  @IBOutlet var questions: UILabel!
  var resultsOfDB : String = ""
  var indexes : [Int] = []
  var counter : Int = 0
  var newStr : String = ""
  //*****************************************************************
  
  @IBAction func getNewQbutton(sender: AnyObject) {
  
      let container = CKContainer.defaultContainer()
      var publicDB = container.publicCloudDatabase
  
  
      let myQuery = CKQuery(recordType: "QuestionsTable", predicate: NSPredicate(value: true))
  
  
      publicDB.performQuery(myQuery, inZoneWithID: nil){
          results, error in
  
          if error != nil {
              println(error)
          }
  
          else
          {
  
              dispatch_async(dispatch_get_main_queue(), { () -&gt; Void in
  
                  self.resultsOfDB = results.description
  
                  //for each character in resultsOfDB
                  for character in self.resultsOfDB{
  
                      if(character == "\""){
                          self.indexes.append(self.counter)
  
                      }
                      self.counter++
                  }
  
  
                  self.newStr = self.resultsOfDB.substringWithRange(Range&lt;String.Index&gt;(start: advance(self.resultsOfDB.startIndex, self.indexes[0] + 1), end: advance(self.resultsOfDB.endIndex, -(self.counter - self.indexes[1]))))
  
                  self.questions.text = self.newStr
              })
          }
      }
  
  }
  </code></pre>
  
  <p>Does anyone know how someone can read in my database when they aren't logged in to my iCloud account? Thanks!</p>