title: Not sending any text messages
body: <p>I want to implement sending of text messages in my app. I'm new to this, so please bear with me.    </p>
  
  <p>Here is the code for the button that the user should tap when wanting to send a message:     </p>
  
  <pre><code>   @IBAction func sendMessageButtonTapped(_ sender: UIButton) {
  
  
          if let accountSID = ProcessInfo.processInfo.environment["TWILIO_ACCOUNT_SID"],
              let authToken = ProcessInfo.processInfo.environment["TWILIO_AUTH_TOKEN"] {
  
              let url = "https://api.twilio.com/2010-04-01/Accounts/\(accountSID)/Messages"
              let parameters = ["From": "123456789", "To": "987654321", "Body": "Hello from Swift!"]
  
              AF.request(url, method: .post, parameters: parameters)
                  .authenticate(username: accountSID, password: authToken)
                  .responseJSON { response in
                      debugPrint(response)
  
              }
              print(accountSID) //Does not get called
              RunLoop.main.run()
          }     
      }    
  </code></pre>
  
  <p>This code is snached from <a href="https://www.twilio.com/blog/2018/03/sending-text-messages-in-swift-with-twilio.html" rel="nofollow noreferrer">Twilio´s own guide to sending text messages from Swift</a></p>
  
  <p>When I follow the guide, and build in terminal it sends the message, but when I run the app with the above code, nothing happens. Should the <code>package.swift</code>and ´main.swift´ be implemented in the project somehow? Or am I completely off target here?    </p>
  
  <p><strong>EDIT*</strong>
  When I add:</p>
  
  <pre><code> print(ProcessInfo.processInfo.environment["TWILIO_ACCOUNT_SID"])
   print(ProcessInfo.processInfo.environment["TWILIO_AUTH_TOKEN"])
  </code></pre>
  
  <p>to the <code>@IBAction func sendMessageButtonTapped(_ sender: UIButton)</code> it return nil, but if I run the commands: <code>echo $TWILIO_AUTH_TOKEN</code> and <code>echo $TWILIO_ACCOUNT_SID</code> it returns the correct values. </p>