Skip to content
0:00 / 0:00

#swiftui#async-await#actors

SwiftUI 3 Tutorial - Build an iOS 15 News App with NewsAPI | Full Course

Xcoding with Alfian

10K subscribers • 8 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Alfian
  • Linked in the descriptionalfianlosari/NewsAppSwiftUI
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

17K views5 years ago1 recommendation

Mobile developmentSwiftiOS and SwiftUIHTTP, REST and GraphQL

Alfian teaches how to build a complete iOS news application using SwiftUI 3 and modern Swift concurrency features.

In this course, we will build a Full News App using SwiftUI 3 from scratch to finish that fetches latest news from newsapi.org. Along the way, we'll learn and use most of the new APIs such as Async Await, Structured Concurrency, Actors, AsyncImage, Refreshable, SwipeActions, Searchable with suggestions. #swiftui Here are the main features of the News App we'll build: 1. Fetch news based on categories: general, business, science, technology, health, entertainment, sports 2. Bookmark articles so it can be persisted even when the app restarts. 3. Share article using native iOS share sheet UIActivityController. 4. Read article inside a Safari WebView in modal sheet presentation. 5. Search news based on the search query you type on the search bar. 6. Recent search history list. 7. Suggestion search list. Update: The async{} syntax has since been renamed to Task{} starting from Xcode 13 Beta 3. You also need to add @Sendable keyword for loadTask and refreshTask methods in NewsTabView. Please check the completed project from GitHub repo for any build issue. At , i missed the search invocation after assigning searchVM.searchQuery with the new value. You should add search invocation below the assignment to trigger the search after the user taps on the history item. Timeline: Introduction - What we will build demo Create Xcode project NewsAPI Article models and stub JSON ArticleRowView with AsyncImage ArticleListView Safari WebView sheet presentation Native share sheet with UIActivityController Fetch Articles Async Function from NewsAPI with Category ArticleNewsVM ObservableObject with MainActor NewsTabView with phase view management ArticleBookmarkVM ObservableObject BookmarkTabView Actor Plist Disk Persistence for Bookmarks Add SearchBar to filter bookmarks Search Articles Async Function from NewsAPI ArticleSearchVM ObservableObject SearchTabView Search Suggestions View Add Recent Search History List SwipeAction to delete recent search keyword Persist recent searches keywords as plist Closing Complete Project GitHub Repository: github.com/alfianlosari/NewsAppSwiftUI Part 2 - Add iPadOS UX Adaptivity to an iOS News App with SwiftUI 3: youtu.be/AcV440Pv9a4 What’s the difference between @StateObject and @ObservedObject? - Donny Wals: donnywals.com/whats-the-difference-between-stateobject-and-o…

Why it's here

1 person recommends this

What people say. Recommended as a comprehensive tutorial for building a full iOS app with modern Swift concurrency.

u/alfianloin r/swift • Recommends

Build an iOS News App with SwiftUI 3 & NewsAPI | From scratch to finish