Sending and receiving Codable data with URLSession and SwiftUI - Cupcake Corner SwiftUI Tutorial 1/9

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • Download the completed project here: github.com/two...
    Other parts in Project 10:
    Introduction: www.hackingwit...
    1. Sending and receiving Codable data with URLSession and SwiftUI: This video
    2. Loading an image from a remote server: • Loading an image from ...
    3. Validating and disabling forms: • Validating and disabli...
    4. Adding Codable conformance to an @Observable class: • Adding Codable conform...
    5. Adding haptic effects: • Adding haptic effects ...
    6. Taking basic order details: • Taking basic order det...
    7. Checking for a valid address: • Checking for a valid a...
    8. Preparing for checkout: • Preparing for checkout...
    9. Sending and receiving orders over the internet: • Sending and receiving ...
    Wrap up and challenges: www.hackingwit...
    You can find the full set of videos, along with transcriptions, challenges, tests, and more, in my free 100 Days of SwiftUI course: www.hackingwit...
    Watch the full 100 Days of SwiftUI playlist here: • Understanding the basi...

КОМЕНТАРІ • 15

  • @AltonWilson-q8m
    @AltonWilson-q8m Місяць тому +1

    Hello Paul and thank you very much for these videos. I am a novice programmer wannabe and am trying to learn Swift through following your videos. I completed the code for the first tutorial but I am getting nothing back from the API call, just a blank screen. I get the following message: "Communication with Apple failed. Your team has no devices from which to generate a provisioning profile. ..." I am working on a current MacOS machine and the app large is iPhone 15 Pro. Do I need to do something with the App Sandbox under "Capabilities"? When I look under "Capabilities" I do not see the option to add App Sandbox

  • @samsHandle
    @samsHandle 10 місяців тому +4

    Thanks for updating the 100 Days of SwiftUI course! This content is absolutely amazing

  • @30guarino
    @30guarino 10 місяців тому +2

    Paul Hudson! If you're reading this ....Can you PLEASE organize your videos into a mini 'playlist' because the order on which they are uploaded on UA-cam are not in order. Would be greatly appreciated as always thank you for your videos!

    • @twostraws
      @twostraws  10 місяців тому +2

      I already have playlists, including the one this video belongs to:
      ua-cam.com/play/PLuoeXyslFTuaeLdCk0Gc5UFy2x_d5QrdX.html

    • @30guarino
      @30guarino 10 місяців тому +2

      @@twostraws that's crazy! The link you provided has your videos organized but when I go to your playlist tab on your channel it does not have them like your link .... So I'm going to save the link you provided

    • @HelloScotto
      @HelloScotto 10 місяців тому +2

      @@30guarino @twostraws, Exactly! I'm not seeing the playlist link above in the Playlist tab for your channel either. But I sure do love it! Thank you for all this content!

  • @msch3988
    @msch3988 3 місяці тому

    can some kind soul tell me why this works perfect on iOS - but not on macOS (no error, just a blank window). Thank You so much!

    • @twostraws
      @twostraws  3 місяці тому +1

      macOS blocks outgoing connections by default. You need to enable it in your settings.

    • @msch3988
      @msch3988 3 місяці тому

      @@twostraws Thank You so much! Will try to find that setting (-:
      Now works perfect under macOS

  • @BenoitSchwartz
    @BenoitSchwartz 8 місяців тому

    Thanks for this amazing course! I manage to fetch data from my own API but I run into a strange behaviour with JSONDecoder instead of Response.self I have to use [Result].self with the same structure of the course and the data retuning by my api is of type [ { "firstName": "my name" , "lastName": "name" } ] so is not different from iTunes data. Can you please explain why ?

  • @Vadian-i7y
    @Vadian-i7y 10 місяців тому

    Dear Paul, you are influencing positively so many people with your extraordinary courses, but why on earth do you suggest to print meaningless literal strings rather than the real error in catch blocks and even ignore the Decoding error? I’m a frequent user of Stackoverflow and there are so many questions about your Bundle extension which throws fatal errors instead of handling or at least printing the often comprehensive and enlightning thrown errors to help the users to fix their mistakes. No offense, I’m a big fan of your work. Regards Stefan

    • @twostraws
      @twostraws  10 місяців тому +3

      Because I try to introduce concepts a fairly simple, linear way . This is a tutorial who are less than 50 days through coding, having started from nothing at all. What code were you writing when you had learned for under 50 days? Once folks know more, I teach more, and explain why the improved version is better.

    • @Vadian-i7y
      @Vadian-i7y 10 місяців тому

      Thank you very much for the reply. I understand that. But as 100 Days is not a closed system people who don't follow the course can search google for something, find this site, copy&paste the code, replace the URL and the model with something faulty and get no idea why the code fails. Just print("Invalid Data", error) and catching also the Decoding error would be a big improvement.

    • @twostraws
      @twostraws  10 місяців тому +2

      I'll see what I can do when the course is finished. As it is I'm writing, recording, editing, and uploading five videos every day for 3 months, so I'm already rather at capacity.

  • @mykytakhlamov
    @mykytakhlamov 8 місяців тому

    Easy and straightforward