Build Swift Windows News App with WinSDK | WinUI | Swift-WinRT

Sdílet
Vložit
  • čas přidán 22. 05. 2024
  • In this video, we're going to build a modern Windows App using Swift and Microsoft WinSDK, WinUI, WinRT. #swiftlang #windows #iosdevelopment
    Starter Project GitHub Repository:
    github.com/alfianlosari/windo...
    The Browser Company Windows Swift Build 20231213:
    github.com/thebrowsercompany/...
    Visual Studio Community 2022:
    learn.microsoft.com/en-us/vis...
    Visual Studio Code:
    code.visualstudio.com/download
    Completed Project GitHub Repository:
    github.com/alfianlosari/XCANe...
    API Key from NewsAPI Link:
    newsapi.org/
    WinUI 3 Gallery App - Microsoft Store:
    apps.microsoft.com/detail/9P3...
    XCANewsSwiftUI Project GitHub Repository:
    github.com/alfianlosari/NewsA...
    Interoperability: Swift’s Super Power Substack Article:
    speakinginswift.substack.com/...
    Swift, meet WinRT Substack Article:
    speakinginswift.substack.com/...
    The Browser Company Swift/WinRT GitHub Repository:
    github.com/thebrowsercompany/...
    Microsoft WinUI Documentation:
    learn.microsoft.com/en-us/win...
    WinUI Glyph Unicode Points Reference:
    learn.microsoft.com/en-us/win...
    Timeline:
    00:00:00 Intro, Demo, Getting Started
    00:05:47 Build, Compilling & Running Source Code
    00:10:31 Include Generated WinUI XAML Controls in CMake
    00:11:40 Architecture Overview
    00:16:56 Add Shared Models & NewsAPI from XCANewsSwiftUI AppleProject
    00:28:15 Implement Window Subclass
    00:34:55 Implement NavigationView
    00:47:49 Implement Fetch Articles from NewsAPI
    00:53:50 Implement GridView
    01:19:28 Implement Pull To Refresh Container
    01:22:18 Implement Canvas with Overlay Stack Panel for Info Text, Progress, & Refresh Button
    01:40:44 Testing all states: success, fetching, failure, empty
    01:42:00 Closing
  • Věda a technologie

Komentáře • 19

  • @josbexerra8115
    @josbexerra8115 Před 3 měsíci +2

    Excelente....Muchas gracias mister Alfian

  • @scarminio
    @scarminio Před měsícem

    Hi, Alfian!
    Great video! I'm sure it is serving as a guideline for many people!
    Do you know how to use the DataTemplate for a combobox? Specialy when the combobox items are objects and you want the combobox to display a customized cell with the object properties.

  • @ShaqarudenGames
    @ShaqarudenGames Před 2 měsíci

    Could you make a video of building up your starter project? Your fork is currently 6 commits behind thebrowsercompany repo

  • @mohannadhashem
    @mohannadhashem Před 2 měsíci

    Do you know if this is somehow possible running on ARM using Parallels in a virtual machine? I have followed your steps and can't get it to compile.

  • @TheiTE
    @TheiTE Před měsícem

    Hey! So I don't own a Windows PC and I'm trying to get this to work on Windows on ARM through Parallels Desktop on my M2 MBA, I purchased the license and then when I tried to follow along with the tutorial, it says "This platform (arm-64-win32) is not supported". Is there anything I can do to get this fixed? Otherwise I must get a refund for parelells lol.

  • @Sonu872_
    @Sonu872_ Před 3 měsíci

    This is great but I do have one question is it possible to accomplish SwiftUI like declarative programming here?

    • @ShaqarudenGames
      @ShaqarudenGames Před 2 měsíci

      Someone would need to write it but yes I think it should be possible

  • @raspberryjoe
    @raspberryjoe Před 3 měsíci +2

    🎉

  • @felixxu5870
    @felixxu5870 Před 3 měsíci +1

    Is cmake required? can it be replaced by swiftPM?

    • @XCA
      @XCA  Před 3 měsíci

      For now, its required i think.

  • @XVOIDFN
    @XVOIDFN Před 2 měsíci

    for me it end with code 1 please help

  • @nathann8361
    @nathann8361 Před 3 měsíci

    how to use acrylic backdrop? i got error while compiling

    • @XCA
      @XCA  Před 3 měsíci

      I have tried that as well. Looks like acrylic is not available with current swiftwinrt generated projection.

    • @nathann8361
      @nathann8361 Před 3 měsíci

      @@XCA but how arc on windows using acrylic?

  • @vanchao
    @vanchao Před 3 měsíci

    Can swift running on Android?

    • @XCA
      @XCA  Před 3 měsíci +3

      There are several tools that can achieve this. For example skip.tools enables you to transpiles your Swift Code to Kotlin and run it on Android.

    • @vanchao
      @vanchao Před 3 měsíci

      @@XCA did Apple support it or not? Like kotlin has kotlin multiplatform officially support running on iOS system

    • @raspberryjoe
      @raspberryjoe Před 3 měsíci

      @@XCA This tool looks very interesting. Thanks!

    • @XCA
      @XCA  Před 3 měsíci

      @@vanchao No, Apple doesn’t provide official support