title: why i need to do a string interpolation to my string value in my dictionary
body: <p>I am a beginner, I send a request to login to a server, the server need username, password, ket and registration ID (token for Firebase cloud Messaging), as we can see below the regID is actually  a string</p>
  
  <p><a href="https://i.stack.imgur.com/WrmSW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WrmSW.png" alt="enter image description here"></a></p>
  
  <p>but why do i need to do a string interpolation of <code>regID</code>?</p>
  
  <p>i think in the <code>parameters</code> dictionary, it will be alright if i write just <code>regID</code> as the value of "registrationId"</p>
  
  <pre><code>"registrationId" : regID 
  </code></pre>
  
  <p>like that,</p>
  
  <p><strong>but it doesn't work, the server will not receive that registrationID</strong>, so I have to write like this</p>
  
  <pre><code>"registrationId" : "\(regID)"
  </code></pre>
  
  <p>the regID is actually a string, but i don't understand why I have to do string interpolation to a string value. the code i use are below</p>
  
  <pre><code>     @IBAction func loginButtonDidPressed(_ sender: Any) {
  
                  self.activityIndicator.startAnimating()
  
  
                  guard let regID = registrationID else {return}
  
                  // send request to server
                  let url = URLService.login.endPoint
  
                  let parameters = [
                      "loginUser" : usernameTextField.text!,
                      "password" : passwordTextField.text!,
                      "registrationId" : "\(regID)",
                      "key" : "@PakuAttendance20171207@"
  
                  ]
  
  // the networking service below is actually alamofire
                  NetworkingService.fetchJSON(url: url, methodUsed: .post, parameters: parameters) { (result) in
  
                      switch result {
                      case .failure(let error) :
                          self.activityIndicator.stopAnimating()
                          self.showAlert(alertTitle: "Sorry", alertMessage: error.localizedDescription, actionTitle: "Back")
                      case .success(let jsonFromServer) :
  
          }
  </code></pre>
  
  <p>the registrationID value is :</p>
  
  <blockquote>
    <p>dYhReMYcbZs:APA91bGK9fH_Xa5lctmuH3e4m1zY9gUsVMfR34zsBHoVYStLITIcWZKr30Mu-0NqLuSE-rr25V2BnwAdpWvdAzW7i1BNFokz33pEoSr2fBZd468z0SwOGTytnrFHdNKFhTlGFHNZF3</p>
  </blockquote>