Latest 2.0.2
Homepage https://github.com/appwise-labs/PhoneVerificationController
License MIT
Platforms ios 9.0
Dependencies CountryPickerSwift, PhoneNumberKit
Authors , ,

Version
License
Platform
Swift version

Screenshots
Screenshots
Screenshots
Screenshots

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate PhoneVerificationController into your Xcode project using CocoaPods, specify it in your Podfile:

use_frameworks!

pod 'FireBase/Auth'
pod 'PhoneVerificationController'

Note that you’ll need to add FireBase/Auth as well (we can’t depend on it as it’s a static framework). Then, run the following command:

$ pod install

Usage

Follow the first 2 steps for Firebase authentication on iOS as documenteded here. PhoneVerificationController will handle the rest, as long as you invoke it using:

import FirebaseAuth
import PhoneVerificationController

let configuration = Configuration(requestCode: { phone, completion in
    PhoneAuthProvider.provider().verifyPhoneNumber(phone, completion: completion)
}, signIn: { verificationID, verificationCode, completion in
    let credential = PhoneAuthProvider.provider().credential(withVerificationID: verificationID, verificationCode: verificationCode)
    Auth.auth().signIn(with: credential) { _, error in completion(error) }
})
let vc = PhoneVerificationController(configuration: configuration)
vc.delegate = self
present(vc, animated: true)

You’ll receive a callback if the verification succeeds, or is cancelled.

Authors

License

PhoneVerificationController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "PhoneVerificationController",
    "version": "2.0.2",
    "summary": "A nicer UI for FireBase phone authentication.",
    "description": "This is a replacement for FireBaseUI for phone authentication. The UI is completely customizable using a configuration structure.",
    "homepage": "https://github.com/appwise-labs/PhoneVerificationController",
    "authors": {
        "David Jennes": "[email protected]",
        "Tom Knapen": "[email protected]",
        "Yannick Winters": "[email protected]"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.0",
    "source": {
        "git": "https://github.com/appwise-labs/PhoneVerificationController.git",
        "tag": "2.0.2"
    },
    "source_files": "Source/*.swift",
    "resource_bundles": {
        "PhoneVerificationControllerResources": [
            "Resources/**/*"
        ]
    },
    "dependencies": {
        "CountryPickerSwift": [
            "~> 1.4"
        ],
        "PhoneNumberKit": [
            "~> 2.0.0"
        ]
    }
}

Pin It on Pinterest

Share This