使用未parsing的标识符'GMSServices'

我正在使用Xcode 7.1,部署目标是iOS 9.1。 该应用程序是“AreaCalculator”,它是用Swift编写的。 我没有按照以下步骤设置框架并导入地图:

  1. $ sudo gem安装cocoapods

  2. 在“AreaCalculator”$ touch Podfile下

  3. 在Podfile中我把:

    source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.1' pod 'GoogleMaps' 
  4. $ pod安装

    在terminal:

    [!]无法加载插件规范/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-release-fix-0.1.2更新本地规格库分析依赖项下载依赖项安装GoogleMaps(1.10.5)生成Pods项目集成客户端项目

    [!]从现在开始,请closures当前的Xcode会话并为此项目使用AreaCalculator.xcworkspace 。 发送统计信息Pod安装完成! Podfile有1个依赖项,安装了1个完整的pod。

  5. 之后,我在导航器中select了AreaCalculator文件夹并selectFile \ New \ File …,然后selectiOS \ Source \ Objective-C文件模板并创build一个桥接文件:
    “AreaCalculator桥接-Header.h”。

    • “#import GoogleMaps / GoogleMaps.h
  6. 然后在“与库链接二进制文件”中添加“GoogleMaps.framework”。 “GoogleMaps.framwork”和“”GoogleMaps.bundle“都在Pods文件夹中。

  7. 所有这些完成后,在AppDelegate.swift中,我把:

     import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? let googleMapsApiKey = "MY_GOOGLE_IOS_API_KEY" func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. GMSServices.provideAPIKey(googleMapsApiKey) return true } } 

但是,编译器向我展示了一个错误“使用未parsing的标识符”GMSServices“”。

我不知道我做错了什么? 任何人都可以帮忙

谢谢!

我已经通过在AppDelegate.swift中“导入GoogleMaps”来解决这个问题。