Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

157
Visualizações
AWS Amplify / iOS SDK tutorial missing steps

I am following this Getting Started guide for building an iOS app using the AWS Amplify CLI and the AWS SDK for iOS.

And I had previously followed the steps in this Apple Getting Started guide for simply creating the basic framework for a Single View Application.

Everything works without a hitch: I was able to build my empty project in Xcode, launch the simulator, see my white blank screen, both before and after starting the AWS iOS SDK Swift tutorial.

My problem is that the AWS tutorial presumes more Swift knowledge than I have. So when it says the following toward the end—

Call the runMutation(), runQuery(), and subscribe() methods from your app code, such as from a button click or when your app starts in viewDidLoad().

—the guide has essentially skipped some steps.

I've already created the required AWS resources for this tutorial but I don't know how to call the functions and update the DynamoDB table that gets set up.

Assuming I can add two text fields to the UI View (one for the ToDo 'name' and one for the 'description') and tie a button to them, can someone help me go the rest of the way?

UPDATE Answered below. I received a down-vote for asking this question, but one might argue that a Getting Started guide should be self-contained. No biggie; I worked across the two tutorials and solved my problem and posted an answer for those who are confused as I was.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

So, I was able to successfully complete the AWS Amplify / iOS SDK Getting Started guide after leveraging the Apple iOS Swift Getting Started guide to create the necessary view elements required by AWS. What that means is this:

Two text fields: 'name' and 'description'; a label; and a button. Here are my outlet properties:

//MARK: Properties
@IBOutlet weak var nameTextField: UITextField!
@IBOutlet weak var descTextField: UITextField!
@IBOutlet weak var todoItemLabel: UILabel!

My viewDidLoad():

override func viewDidLoad() {
    super.viewDidLoad()

    // Handle the text field’s user input through delegate callbacks.
    nameTextField.delegate = self
    descTextField.delegate = self

    let appDelegate = UIApplication.shared.delegate as! AppDelegate
    appSyncClient = appDelegate.appSyncClient
}

My button action which calls runMutation():

//MARK: Actions
@IBAction func addToDoItem(_ sender: UIButton) {
    runMutation()
}

And changes to runMutation() to update DynamoDB with the entered values:

let mutationInput = CreateTodoInput(name: nameTextField.text ?? "No Entry", description: descTextField.text)

If you have followed Steps 1 - 4 of the AWS Amplify / iOS SDK Getting Started guide and added the necessary UI elements then the code above will seal the deal.

Also note that the API reference pointed at by @dennis-w in the comments above takes care of those deprecated references in AppDelegate from the Getting Started guide.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda