要使用 CocoaPods 将 VerifireKit 集成到您的 Xcode 项目中,请在其 Podfile
中指定它
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'TargetName' do
pod 'VerifireKit'
end
然后,运行以下命令
$ pod install
self.verifire = [[VFVerifire alloc] initWithKey:<YOUR SDK KEY>];
[self.verifire verifyNumber:phoneNumberString method:VFVerifireMethodSMS completion:^(NSError * _Nullable error) {
if (! error)
{
// Number verification successfylly requested
}
}];
[self.verifire confirmWithCode:PINCode completion:^(NSString * _Nullable phoneNumber, NSString * _Nullable requestId, NSError * _Nullable error) {
if (! error)
{
// Phone number successfully verified
}
}];