Torsten2217 / google-plus-platform

Automatically exported from code.google.com/p/google-plus-platform
0 stars 0 forks source link

Google Plus iOS SDK in Swift and CocoaPods #1079

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In an iOS app I'm developing, I need to add Google+ sign-in feature. The app is 
developed in Swift. 

I added the GooglePlus iOS SDK through CocoaPods. Please note that I have 
CocoaPods v0.36 beta installed which officially supports Swift. I've integrated 
many Objective-C libraries with Swift projects this way.

The pod installation was successful. Then I needed to import the framework to 
files where I wanted to use its methods so I added the below line to the top of 
the file.

import GooglePlus

But when I build the project I get the following error.

No such module 'GooglePlus'

Any idea why this is happening? Am I specifying the correct name?

Original issue reported on code.google.com by isuru.j...@gmail.com on 24 Jan 2015 at 5:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Use bridging header file for google frameworks with lines below even with pods 
v0.36.

#import <GooglePlus/GooglePlus.h>
#import <GoogleOpenSource/GoogleOpenSource.h>

Had the same issue and didn't find solution how to import Google framework as 
swift module.

Here is my pod file 

xcodeproj "...xcodeproj"

source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!

platform :ios, "8.0"

target "..." do
pod "AFNetworking", "~> 2.5"
pod "AFNetworkActivityLogger", "~> 2.0"
pod "PromiseKit/Swift", "~> 1.5"
pod "googleplus-ios-sdk", "~> 1.7"
end

Original comment by Ivanov.Vitalii on 12 May 2015 at 9:24