Google iOS 丢失文件的验证器
Google Authenticator for iOS Missing Files
我已经从 here 克隆了 Google 验证器源代码。打开Xcode中的iOS项目后,发现少了很多文件,导致编译时出现了数百个编译错误。仅部分丢失的文件是:
GTMNSDictionary+URLArguments.h
GTMNSString+URLArguments.h
GTMLocalizedString.h
GTMRegex.h
有没有人能够为 Google Authenticator 构建 iOS 项目?
更新(2015 年 6 月 29 日)
我找到了丢失的 ZXing 文件 here and the missing Google Toolbox for Mac files here。然后,我 运行 在 OTPAuthURLEntryController.m
中的这一行出现构建错误:
@property (nonatomic, retain) __attribute__((NSObject)) dispatch_queue_t queue;
我通过将行更改为来修复它:
@property (nonatomic, retain) dispatch_queue_t queue;
现在我正在尝试解决以下 "symbol(s) not found" 问题:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Decoder", referenced from:
objc-class-ref in OTPAuthURLEntryController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已经搜索了所有 SO,但仍然没有弄明白。任何帮助将不胜感激!
我找到了丢失的 ZXing 文件 here and the missing Google Toolbox for Mac files here。然后我将适当的缺失文件添加到项目中。在此之后,我 运行 在 OTPAuthURLEntryController.m
中的这一行出现构建错误:
@property (nonatomic, retain) __attribute__((NSObject)) dispatch_queue_t queue;
我通过将行更改为:
来修复它
@property (nonatomic, retain) dispatch_queue_t queue;
之后,我运行进入如下"symbol(s) not found"错误信息:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Decoder", referenced from:
objc-class-ref in OTPAuthURLEntryController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
事实证明,主项目 (OTPAuth
) 正在链接到名为 libZXingWidget.a
的库,该库已丢失(与许多其他项目一样)。我在丢失的 ZXing 文件中打开了 ZXingWidget
项目,并通过删除将警告视为错误的自定义标志来修复构建错误。然后,我构建了静态库并将构建目标设置为 iOS Device。这生成了我需要的 libZXingWidget.a
文件。我在主项目 (OTPAuth
) 的构建阶段链接了该文件,现在 Google Authenticator 在 iPhone 6 模拟器上运行!
我已经从 here 克隆了 Google 验证器源代码。打开Xcode中的iOS项目后,发现少了很多文件,导致编译时出现了数百个编译错误。仅部分丢失的文件是:
GTMNSDictionary+URLArguments.h
GTMNSString+URLArguments.h
GTMLocalizedString.h
GTMRegex.h
有没有人能够为 Google Authenticator 构建 iOS 项目?
更新(2015 年 6 月 29 日)
我找到了丢失的 ZXing 文件 here and the missing Google Toolbox for Mac files here。然后,我 运行 在 OTPAuthURLEntryController.m
中的这一行出现构建错误:
@property (nonatomic, retain) __attribute__((NSObject)) dispatch_queue_t queue;
我通过将行更改为来修复它:
@property (nonatomic, retain) dispatch_queue_t queue;
现在我正在尝试解决以下 "symbol(s) not found" 问题:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Decoder", referenced from:
objc-class-ref in OTPAuthURLEntryController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已经搜索了所有 SO,但仍然没有弄明白。任何帮助将不胜感激!
我找到了丢失的 ZXing 文件 here and the missing Google Toolbox for Mac files here。然后我将适当的缺失文件添加到项目中。在此之后,我 运行 在 OTPAuthURLEntryController.m
中的这一行出现构建错误:
@property (nonatomic, retain) __attribute__((NSObject)) dispatch_queue_t queue;
我通过将行更改为:
来修复它@property (nonatomic, retain) dispatch_queue_t queue;
之后,我运行进入如下"symbol(s) not found"错误信息:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Decoder", referenced from:
objc-class-ref in OTPAuthURLEntryController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
事实证明,主项目 (OTPAuth
) 正在链接到名为 libZXingWidget.a
的库,该库已丢失(与许多其他项目一样)。我在丢失的 ZXing 文件中打开了 ZXingWidget
项目,并通过删除将警告视为错误的自定义标志来修复构建错误。然后,我构建了静态库并将构建目标设置为 iOS Device。这生成了我需要的 libZXingWidget.a
文件。我在主项目 (OTPAuth
) 的构建阶段链接了该文件,现在 Google Authenticator 在 iPhone 6 模拟器上运行!