Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alfianlosari/newsappswiftui

A Full News App based on the latest SwiftUI 3 API and Swift 5.5 that fetches latest news from newsapi.org. Multiplatform support targeting iOS 15, macOS 12, watchOS 8, tvOS 15.
https://github.com/alfianlosari/newsappswiftui

ios ios15 ipados ipados15 macos macos12 swift swiftui swiftui3 tvos tvos15 watchos watchos8

Last synced: about 14 hours ago
JSON representation

A Full News App based on the latest SwiftUI 3 API and Swift 5.5 that fetches latest news from newsapi.org. Multiplatform support targeting iOS 15, macOS 12, watchOS 8, tvOS 15.

Awesome Lists containing this project

README

        

# SwiftUI 3.0 News App for iOS 15, iPadOS 15, macOS 12, watchOS 8, tvOS 15

![Alt text](./promo.jpg?raw=true "SwiftUI News App")

A Full News App based on the latest SwiftUI 3 that fetches latest news from newsapi.org targeting iOS 15, macOS 12, watchOS 8, and tvOS 15.

## Features
The app has several main features:
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.
8. Watch Connectivity and Watch Face Complication support for watchOS.
9. Intent Configurable Widgets - iOS, iPadOS, macOS - S, M, L, XL Family Sizes

## SwiftUI 3 API:
The SwiftUI 3 APIs used to build the app:
1. Async Await, Structured Concurrency, and Actors.
2. Task Lifecycle View Modifer.
3. AsyncImage.
4. Refreshable and SwipeAction on List.
6. Actor to isolate disk persistence.
7. Crafting Search Experience using Swift Searchable modifier. synchronous local search and async remote search, as well as providing search suggestions.

## Getting Started
- Register for an API Key at https://newsapi.org
- Paste the key inside NewsAPI.swift file.
- Download Xcode 13 from App Store.

## Installation
- Build and run the project using iOS 15, iPadOS 15, watchOS 8, tvOS 15 physical devices or simulator from Xcode 13
- For building macOS 12 target you need to use Xcode 13 Beta 5 or upcoming Xcode 13.X release and macOS 12 Beta 7.

## Tutorial
This project is based on the YouTube tutorial series that you can watch from these links:
1. Build an iOS News App with SwiftUI 3 & NewsAPI | Full Course [YouTube](https://youtu.be/LRnbFjq0bTM).
2. Add iPadOS UX Adaptivity to an iOS News App with SwiftUI 3 | Full Course [YouTube](https://youtu.be/AcV440Pv9a4).
3. Build a macOS News App with SwiftUI 3 & NewsAPI | Full Course [YouTube](https://youtu.be/YSR_Hk-ivrA).
4. Build a watchOS News App with SwiftUI 3 & NewsAPI | Full Course [YouTube](https://youtu.be/2qA-gDWbOTU).
5. Build a tvOS News App with SwiftUI 3 & NewsAPI | Full Course [YouTube](https://youtu.be/TQG79xncC74).
6. Data Caching with SwiftUI Task [YouTube](https://youtu.be/MQYb9S8QD4E).
7. Adding Infinity Scroll Pagination in SwiftUI with Task Modifier [YouTube](https://youtu.be/mr8ARRnzxY0).
8. 8 Add Widget to Home Screen [YouTube](https://youtu.be/gl9g9EmC6jU).