2017-04-17 74 views
2

我想GTMAppAuth和整合的GDrive如下步骤发现:GTMAppAuth 'presentingViewController' 不是在函数声明

$吊舱安装

target 'GTMAppAuth Drive Example iOS' do 
    platform :ios, '8.0' 

    pod 'GTMAppAuth' 
    pod 'GoogleAPIClientForREST/Drive' 
end 

$打开示例 - iOS.xcworkspace

https://github.com/google/GTMAppAuth/tree/master/Example-iOS

将客户端ID从Google控制台复制到剪贴板。 在GTMAppAuthExampleViewController.m中用新的客户端ID更新kClientID。

最后,打开Info.plist并完全展开“URL类型”(又名“CFBundleURLTypes”),并将com.googleusercontent.apps.YOUR_CLIENT替换为客户端ID的反向DNS表示法(不包括:/ oauthredirect路径零件)。

但是 为什么在评论中发生错误? 我的版本的Xcode 8.3.1是

enter image description here

回答

5

上有AppAuth未的github上打开的问题:https://github.com/google/GTMAppAuth/issues/21

现在的解决方法似乎是这一行添加到Podfile:
pod 'AppAuth', :inhibit_warnings => true

+0

当我添加此行并重新编译它之后。 Xcode显示「找不到-lAppAuth的档案库」 –

+0

我将「只建立活动架构」设定为「否」。-lAppAuth问题解决 –