Google App Indexing 未解析 Swift?

Google App Indexing not resolving for Swift?

我正在尝试整合 Google App Indexing into my iOS / Swift app. I installed it via CocoaPods。问题是它没有解析 Google 的任何代码。这是我得到的:

func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
    var sanitizedURL = GSDDeepLink.handleDeepLink(url)
    return true
}

编译错误说:Use of unresolved identifier 'GSDDeepLink'。我尝试添加 import GoogleAppIndexing 甚至 import GSDDeepLink,但它显示:no such module 'GoogleAppIndexing'。任何想法或任何人都可以使用 Swift?

在支持文件下,应该有一个以“-Bridging-Header.h”结尾的文件。您想在那里执行 Objective-C 导入语句:

#import <GoogleAppIndexing/GoogleAppIndexing.h>