質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

Facebook

Facebookは、実名登録制のSNS(ソーシャル・ネットワーキング・サービス)です。開発者用のデベロッパーサイトが存在し、一般ユーザーによるFacebook向けアプリケーション開発が可能です。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

Q&A

0回答

747閲覧

Firebaseを用いた、facebookログインの実装における、SDKのimportエラー

shutainer

総合スコア11

Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

Facebook

Facebookは、実名登録制のSNS(ソーシャル・ネットワーキング・サービス)です。開発者用のデベロッパーサイトが存在し、一般ユーザーによるFacebook向けアプリケーション開発が可能です。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

0グッド

0クリップ

投稿2020/06/26 08:10

firebaseを用いてfacebookログインを実装しようとしています。

とある講座の教材として実装しているのですが、
cocoapodsで下記ライブラリをinstallし、

ruby

1# Uncomment the next line to define a global platform for your project 2# platform :ios, '9.0' 3 4target 'Swift5FacebookLoginWithFirebase_3' do 5 # Comment the next line if you don't want to use dynamic frameworks 6 use_frameworks! 7 8 # Pods for Swift5FacebookLoginWithFirebase_3 9 pod 'Firebase/Auth' 10 pod 'FacebookSDK' 11 pod 'Firebase/Core' 12 pod 'FacebookCore' 13 pod 'FacebookLogin' 14 pod 'FacebookShare' 15 pod 'SDWebImage/WebP' 16 17end 18```swift 19 20viewControllerにて、 21下記のように 22importしていますが、下記画像のようにFBSDKCoreKItNo such module~となります。 23なぜでしょうか? 24 25![イメージ説明](ba9c0ca4727a382b8f50609209aba1f3.png) 26

import UIKit
import FBSDKCoreKit
import FBSDKLoginKit
import FacebookCore
import FacebookLogin
import Firebase

class ViewController: UIViewController, LoginButtonDelegate {

let fbLoginButton: FBLoginButton = FBLoginButton() var displayName = String() var pictureURL = String() var pictureURLString = String() override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. fbLoginButton.delegate = self fbLoginButton.frame = CGRect(x: view.frame.size.width/2 - view.frame.size.width, y: view.frame.size.width/4, width: view.frame.size.height/2, height: 30) fbLoginButton.permissions = ["public_profile,email"] view.addSubview(fbLoginButton) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) navigationController?.isNavigationBarHidden = true } func loginButton(_ loginButton: FBLoginButton, didCompleteWith result: LoginManagerLoginResult?, error: Error?) { if error == nil { if result?.isCancelled == true { return } } let credential = FacebookAuthProvider.credential(withAccessToken: AccessToken.current!.tokenString) Auth.auth().signIn(with: credential) { (result, errror) in if let error = error{ return } self.displayName = result!.user.displayName! self.pictureURLString = result!.user.photoURL!.absoluteString UserDefaults.standard.set(1, forKey: "loginOK") UserDefaults.standard.set(self.displayName, forKey: "displayName") UserDefaults.standard.set(self.pictureURLString, forKey: "pictureURLString") } } func loginButtonDidLogOut(_ loginButton: FBLoginButton) { <#code#> }

// //github試験用
// func Log() {
// print("gittest")
// }
//
// //さらに変更
// func Log2() {
// print("gittest")
// }

}

pod install で下記のようにwarningがでます。 ちなみに、rbenvでrubyを2.7.0に最近しました。関係があるのでしょうか?

Analyzing dependencies
/Users/eishunsudo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:342: warning: URI.escape is obsolete
(以下同様)
/Users/eishunsudo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:342: warning: URI.escape is obsolete
Downloading dependencies
Generating Pods project
/Users/eishunsudo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer/pbxproj.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/eishunsudo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer.rb:35: warning: The called method `initialize' is defined here
Integrating client project
/Users/eishunsudo/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:342: warning: URI.escape is obsolete
Pod installation complete! There are 7 dependencies from the Podfile and 23 total pods installed.

コード

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問