Giter VIP home page Giter VIP logo

cryptowallet's Introduction

CryptoWallet

iOS app for managing your cryptocurrency

By Zaid Al Rakabi

Build Status

Description

For this app I have so far implemented the phone verification for CryptoWallet. Currently the app functions by taking in as input a US phone number. Then it parses, formats, and checks the number using the libPhoneNumberiOS library. If the phone number is accurate an alert message is displayed saying that a verification code will be sent. Otherwise an error alert is printed to try again.

Tech

Functions

VerifyPressed()
  • Action for the Verify Button to check the phone number the user has input
  • Has do() catch() for error handling
  • Gets phoneField input and validates using: parse(), format(),isValidNumber() from the libPhoneNumber-iOS library
  • If the Action is not valid throws an error and alerts the user using: catchError, setGenerateAlert()
catchError()
  • checks the return of   isValidNumber()
  • if the phone Number is not valid then throws an invalidPhoneNumber error
setGenerateAlert()
  • Initializes new UIAlertController with the passes in alertTitle and Message
  • Then adds an action through   .addAction() to generate a UIAlertAction as an OK button to cancel the alert.
touchesBegan()
  • Once the user touches away from phone number field it goes away by using   .resignFirstResponder()
textField()
  • Function in the Extension of the UITextFieldDelegate
  • Takes whatever is being input into the text field and formats it continouously using the   format() function
format()
  • Function to format 10 digit phone numbers continuously
  • formats the number by checking the digits and calling   replacingOccurrences()

cryptowallet's People

Stargazers

 avatar Zaid Al Rakabi avatar

Watchers

James Cloos avatar Zaid Al Rakabi avatar

Forkers

badobaron

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.