title: Value of optional type String must be unwrapped to a value type of String?
body: <p>I'm new to iOS development. I'm practicing linking actions/outlets between the View and Controller. My problem is that I don't know why it shows me some errors. Could you please take a look at my code and tell me what I'm missing?</p>
  <p>I receive the following errors:</p>
  <blockquote>
  <p>Value of optional type 'String?' must be unwrapped to a value of type 'String'</p>
  <p>Coalesce using '??' to provide a default when the optional value contains 'nil'</p>
  <p>Force-unwrap using '!' to abort execution if the optional value contains 'nil'</p>
  </blockquote>
  <p>Here's the code:</p>
  <pre><code>@IBAction func submitAppointmentDetails(_ sender: Any) {
      appointmentSetName.text = &quot;Congratulations,&quot; + nameField.text + &quot;You have now set up an appointment with us!&quot;
  }
  </code></pre>
  <p>A photo of what's going on: <a href="https://imgur.com/a/WKT4EyE" rel="noreferrer">https://imgur.com/a/WKT4EyE</a></p>
  <p>Edit: @matt This is a different question because the thread you thought this is a duplicate of doesn't have the solution that I was seeking, but two people in this thread did give me the solution. I never would have found the solution if I just read the thread that you shared.</p>