从objective-c中的另一个iOS应用程序设置Google Authenticator?

从objective-c中的另一个iOS应用程序设置Google Authenticator?,ios,objective-c,google-authenticator,Ios,Objective C,Google Authenticator,如何自动启动Google Authenticator iOS应用程序并从Objective-c代码发送数据(颁发者、用户、机密) 这个问题部分地解决了Swift问题,但寻找的是Objective-c。 从iOS 9开始,您需要做的第一件事是将url方案添加到Info.plist中,将其列入白名单 <key>LSApplicationQueriesSchemes</key> <array> <string>otpauth</string

如何自动启动Google Authenticator iOS应用程序并从Objective-c代码发送数据(颁发者、用户、机密)

这个问题部分地解决了Swift问题,但寻找的是Objective-c。

从iOS 9开始,您需要做的第一件事是将url方案添加到Info.plist中,将其列入白名单

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>otpauth</string>
</array>
•用于生成Google Authenticator URL


•您可以查看谷歌内部代码来解析URL。

如果您想在应用程序中使用代码片段来使用谷歌aut,请查看链接
NSString *otpString = @"otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example";
NSURL *otpURL = [NSURL URLWithString:otpString];
if ([[UIApplication sharedApplication] canOpenURL:otpURL]) {
    [[UIApplication sharedApplication] openURL:otpURL];
}