SwiftUI Fetching OTP Automatically - Login Page With Firebase - MVVM - Xcode 13 - SwiftUI Tutorials

preview_player
Показать описание
Hello Guys 🖐🖐🖐
In this Video I'm going to teach how to create Login Page Fully Integrated With Firebase And Fetching OTP Automatically | SwiftUI Auto Fetch OTP | SwiftUI Custom TextFields | SwiftUI OTP TextFields | SwiftUI Firebase Login Page | SwiftUI Firebase Phone Auth | SwiftUI Async/Await | SwiftUI Observable Object | SwiftUI OTP Verification | SwiftUI MVVM | SwiftUI Overlay | SwiftUI @ViewBuilder | Swift | SwiftUI Xcode 13 | SwiftUI for iOS 15 | Xcode 13 SwiftUI.
#apple #swiftui #ios #xcode #animation #ui #ux #design

► Support Us
Or By Visiting the Link Given Below:

► My MacBook Specs
M1 MacBook Pro(16GB)
Xcode Version: 13.3
macOS Version: 12.3 Monetary

► Social Platforms

► Timestamps
0:00 Intro
0:31 Project SetUp
0:55 Building Custom TextFields for OTP Input
7:07 Setting Up Firebase
8:33 Sending OTP
10:09 Building Login Page UI
13:45 Logic For Auto Fetching OTP
14:42 Verifying OTP and Logging In

Thanks for watching
Make sure to like and Subscribe For More Content !!!
Рекомендации по теме
Комментарии
Автор

Note:
Before isLoading = true on the verifyCode Method, add this.
otpText = otpFields.reduce("") { partialResult, value in
partialResult + value
}

Kavsoft
Автор

3:20 why not define the enum as: enum OTPField: Int { case field1 = 0 case field 2...}? Converting an index to OTPField would be a one-liner...

DavidNitzscheBell
Автор

for in don't wort 5:45 why they worked for you?

АртемСуворов-оы
Автор

Was waiting for this from long time 😭🔥

qusaigamer
Автор

does this require iOS developer membership? every time I click send top button it takes me to captcha instead of sending the sms. it also states in the class that publishing changes from background threads is not allowed it should be in the main thread? help please.

Shioze
Автор

The navigationLink with tag as completion is deprecated in iOS 16 how can I overcome that using value and label as parameters??

DPDevs
Автор

When typing the verification code by hand you get an error message "empty sms verification code". Is it possible to have both functions? (Fetching OTP and/or typing by hand)

viewsfromthenorth
Автор

Autofill OTP is not working for me with multiple textFields. Keyboard is not showing the OTP received. Any reason?

amolnikam
Автор

I get an error Index out of range when I try to delete the first number of the OTP code. Any solution for that?

opsenpai
Автор

Thanks Broooo
How can you recieve message by your simulator??

mostafaalzoubi
Автор

@Kavsoft that was good!
But, can you suggest me how to add logout option, in HomePage Please..

abhinavkoppula
Автор

I have implemented same thing but I am facing issue is Current Field is empty then try to click back it is not going to previous field . If current field having text it working as expected only issue with current field is empty after press back is moving to previous field . Can u please help on this.

balachandarsomineni
Автор

I am receiving this message as alert "The phone auth credential was created with any empty verification ID"

kabirsainivlogs
Автор

"the phone auth credential was created with an empty verification code"

viewsfromthenorth
Автор

Fatal error: No ObservableObject of type OTPViewModel found. A View.environmentObject(_:) for OTPViewModel may be missing as an ancestor of this view.

import SwiftUI

struct Verification: View {
@EnvironmentObject var otpModel: OTPViewModel
// MARK: TextField FocusState
@FocusState var activeField: OTPField?

var body: some View {
VStack{
OTPField()

Button {
Task{await otpModel.verifyOTP()}
} label: {
Text("Verify")
.fontWeight(.semibold)
.foregroundColor(.white)
.padding(.vertical, 12)
.frame(maxWidth: .infinity)
.background{
10, style: .continuous)
.fill(.blue)
.opacity(otpModel.isLoading ? 0 : 1). ==>> Error here otpModel
}
.overlay {
ProgressView()
.opacity(otpModel.isLoading ? 1: 0)
}

slimbody
welcome to shbcf.ru