AllAboutTheWord - A single screen iOS app developed using swiftUI

Overview

All-About-The-Word

Introduction

This is a single screen iOS app developed using swift UI. This application allows you to type a word and fetch details of that word like origin, phonetics, synonyms, antonyms, meaning from API. The app fetches the word details from an api (Api used here is an open api from this address: https://dictionaryapi.dev/). The app also displays a list of words of last 5 searched words.

The Aim of this project is to learn implementation of an iOS app, using SwiftUI.

Here's how the project looks

ezgif com-gif-maker (3)

You might also like...
Tic Tac Toe - Tic Tac Toe mobile application game developed with SwiftUI and AI technology

Hello, there! Welcome to The Tic_Tac_Toe IOS Applicaition The Aricah Cross platf

Swift Language Weather is an iOS weather app developed in Swift
Swift Language Weather is an iOS weather app developed in Swift

Swift Language Weather SwiftWeather has renamed to Swift Language Weather. Because this repo is ranked number one in Google when we search "Swift Weat

An iOS app developed for FOSSASIA in mind

This is an iOS app developed for FOSSASIA in mind. The Open Event Project offers event managers a platform to organize all kinds of events including concerts, conferences, summits and regular meetups.

Moit: a single delivery platform for college students living in dormitories
Moit: a single delivery platform for college students living in dormitories

Moit: a single delivery platform for college students living in dormitories

Single Webview project for xcode in swift

Single Webview project for xcode in swift An xcode project that with single webview(UIWebView) that opens external URL, for hybrid web app debug or te

A weather app developed in React Native. It is the React Native version of SwiftWeather.
A weather app developed in React Native. It is the React Native version of SwiftWeather.

ReactNativeWeather A weather app developed in React Native. It is the React Native version of SwiftWeather How to run the app Install react-native If

IMC - App developed to show the user's BMI
IMC - App developed to show the user's BMI

IMC Swift Aplicativo que o usuário digita seu peso e sua idade e tem como result

ResearchKit app studying Breast Cancer, developed by Sage Bionetworks.

Share the Journey Share the Journey is one of the first five apps built using ResearchKit. Sage Bionetworks' goal in this study is to understand the c

Comments
  • Update completion handler with result type and error handling in better approach

    Update completion handler with result type and error handling in better approach

    enum NetworkError: Error, LocalizedError {
        case badURL
        case dataError
        case httpResponseError(Int)
        case jsonError
        
        var errorDescription: String {
            switch self {
            case .badURL:
                return "Please check your URL"
            case .dataError:
                return "error in response data"
            case .httpResponseError(let errorCode):
                return "Error in response with responseCode \(errorCode)"
            case .jsonError:
                return "Unable to parse Json, Please check the Foemat"
            }
        }
    }
    
    class APIRequest: ObservableObject {
        
        //  Need to under stand how We are consuming Combine here
        @Published var wordData: [WordDetails] = []
        
        func getWordData(forWord text:String, completionHandler: @escaping (Result<[WordDetails], NetworkError>) -> Void) {
            
            guard let url = URL(string: "https://api.dictionaryapi.dev/api/v2/entries/en/\(text)") else {
                completionHandler(.failure(.badURL))
                return
            }
            
            let task = URLSession.shared.dataTask(with: url) { data, response, error in
                
                guard error == nil else {
                    completionHandler(.failure(.dataError))
                    return
                }
                if let response = response as? HTTPURLResponse,
                   !(200...299).contains(response.statusCode) {
                    completionHandler(.failure(.httpResponseError(response.statusCode)))
                }
                guard let data = data else {
                    completionHandler(.failure(.dataError))
                    return
                }
                do {
                    let decodedData = try JSONDecoder().decode([WordDetails].self, from: data)
                    DispatchQueue.main.async {
                        self.wordData = decodedData
                    }
                    completionHandler(.success(decodedData))
                } catch {
                    completionHandler(.failure(.jsonError))
                }
            }
            task.resume()
        }
    }
    
    opened by veerChauhan 0
Owner
null
Recipes app written in SwiftUI using Single State Container

swiftui-recipes-app Recipes app is written in SwiftUI using Single State Container This app implemented as an example of a Single State Container conc

Majid Jabrayilov 512 Dec 31, 2022
Lentit iOS app developed in Swift with SwiftUI using MVVM design pattern

Lentit Track things you lend with Lentit Features 100% Swift 100% SwiftUI MVVM d

W1W1-M 2 Jun 26, 2022
A Simple ToDo app developed using SwiftUI, Combine and Coredata

SwiftUI_Tasks Tasks is simple ToDo app developed using SwiftUI and Coredata which having features like Add,Delete,Rearrange and send notification base

Shankar Madeshvaran 77 Dec 18, 2022
Africa application is developed for learning by using SwiftUI

Africa application is developed for learning by using swiftUI.This application show the list of animals along with information such as name,photo,description and video.This app also use map to show animals on map along with basic animation.

Ghullam Abbas 4 Oct 23, 2022
IOS e-commerce app developed using MVVM architecture with Swift UI

IOS e-commerce app developed using MVVM architecture with Swift UI.

wykee2 1 Apr 2, 2022
Proof concept of modularized app with SwiftPackages built over MVI + Combine + SwiftUI in a single repo

PKDex-iOS Proof concept of modularized app with SwiftPackages built over MVI + Combine + SwiftUI in a single repo Introduction This project is a proof

Miguel Angel Zapata 13 Nov 22, 2022
A todo list iOS app developed with swift5 and coredata to persist data, this app help people organise their tasks on categories.

A todo list iOS app developed with swift5 and coredata to persist data, this app help people organise their tasks on categories. The app is simple, intuitive, and easy to use and update tasks informations.

null 1 Oct 10, 2022
Informant is a macOS menu bar app that lets you inspect files with a single click. 🔍

Informant Inspect files with a single click. Introduction Welcome! If you're not sure what Informant is or what it does please check out informant-app

Ty Irvine 31 Nov 7, 2022
Red Torch is a very very (very) simple iOS app that allows you to have a red torch using your screen.

RED Torch Red Torch is a very very (very) simple iOS app that allows you to have a red torch using your screen. The App is based on storyboard, so the

Jakub 0 Jan 1, 2022
Viagens (SwiftUi) Project developed to study Swift

Viagens (SwiftUi) Project developed to study Swift Made with ?? by Igor Sthaynny ?? Contents ?? Contents ?? Screenshots ?? Technologies ?? How to run

Igor Sthaynny 0 Dec 4, 2021