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

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

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

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

Swift

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

Q&A

解決済

2回答

719閲覧

No such module 'FirebaseUI'

takahiro00

総合スコア84

Firebase

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

Swift

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

0グッド

0クリップ

投稿2019/07/31 13:20

前提・実現したいこと

SwiftでFirebaseを使ってTwitterログイン機能を作りたいのですが、
デバックをしたところで「No such module 'FirebaseUI'」になってしまいます。
'FirebaseUI'はインストールされてるはずなのですが、
TwitterのAPIKEYなども取得して、ソースに記載しています。

以下のサイトを参考に作成しています。
https://qiita.com/matsuei/items/4f56c0f8d9a1b96cd9f0

ご教授頂ければと思います。

発生している問題・エラーメッセージ

No such module 'FirebaseUI'

該当のソースコード

ViewController.swift

swift

1import UIKit 2import Firebase 3import FirebaseUI 4 5class ViewController: UIViewController,FUIAuthDelegate { 6 7 @IBOutlet weak var AuthButton: UIButton! 8 9 var authUI: FUIAuth { get { return FUIAuth.defaultAuthUI()!}} 10 // 認証に使用するプロバイダの選択 11 let providers: [FUIAuthProvider] = [ 12 FUITwitterAuth(), 13 ] 14 15 override func viewDidLoad() { 16 super.viewDidLoad() 17 // authUIのデリゲート 18 self.authUI.delegate = self 19 self.authUI.providers = providers 20 AuthButton.addTarget(self,action: #selector(self.AuthButtonTapped(sender:)),for: .touchUpInside) 21 } 22 23 @objc func AuthButtonTapped(sender : AnyObject) { 24 // FirebaseUIのViewの取得 25 let authViewController = self.authUI.authViewController() 26 // FirebaseUIのViewの表示 27 self.present(authViewController, animated: true, completion: nil) 28 } 29 30 // 認証画面から離れたときに呼ばれる(キャンセルボタン押下含む) 31 public func authUI(_ authUI: FUIAuth, didSignInWith user: User?, error: Error?){ 32 // 認証に成功した場合 33 if error == nil { 34 self.performSegue(withIdentifier: "toTopView", sender: self) 35 } 36 // エラー時の処理をここに書く 37 } 38} 39

↓AppDelegate.swift

swift

1import UIKit 2import Firebase 3import FirebaseUI 4import TwitterKit 5 6@UIApplicationMain 7class AppDelegate: UIResponder, UIApplicationDelegate { 8 9 var window: UIWindow? 10 11 override init() { 12 super.init() 13 // Firebase関連の機能を使う前に必要 14 FirebaseApp.configure() 15 } 16 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 //Twitter認証用のイニシャライズ 18 TWTRTwitter.sharedInstance().start(withConsumerKey:"XXXXX",consumerSecret:"XXXXX") 19 return true 20 } 21 22// func application(_ application: UIApplication, 23// didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) 24// -> Bool { 25// FirebaseApp.configure() 26// return true 27// } 28 29 func applicationWillResignActive(_ application: UIApplication) { 30 // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 31 // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 32 } 33 34 func applicationDidEnterBackground(_ application: UIApplication) { 35 // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 36 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 } 38 39 func applicationWillEnterForeground(_ application: UIApplication) { 40 // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 41 } 42 43 func applicationDidBecomeActive(_ application: UIApplication) { 44 // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 45 } 46 47 func applicationWillTerminate(_ application: UIApplication) { 48 // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 49 } 50 51 52} 53

Podfileは以下のように書いています。

# Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'SwiftTest01' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for SwiftTest01 pod 'Firebase/Database' #pod 'MessageKit', '>= 1.0.0' #pod 'MessageKit' pod 'JSQMessagesViewController' #pod 'MessageInputBar' pod 'FirebaseUI' pod 'Firebase/Core' end

補足情報(FW/ツールのバージョンなど)

バージョンswift4

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

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

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

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

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

hayabusabusash

2019/08/01 00:35

import FirebaseUIをコメントアウトしてビルドするとどうなりますか?
fuzzball

2019/08/01 01:08

>>デバックをしたところで ビルドのことですか? 何をしたらエラーが出たのか具体的(キー操作、メニュー操作など)に書いて下さい。
takahiro00

2019/08/02 10:46

>import FirebaseUIをコメントアウトしてビルドするとどうなりますか? あらゆるところでエラーが出ます・・・・
takahiro00

2019/08/02 10:47

>>>デバックをしたところで >ビルドのことですか? >何をしたらエラーが出たのか具体的(キー操作、メニュー操作など)に書いて下さい。 すみませんビルドです。 左上の三角ボタンを押した時にエラーになります。
takahiro00

2019/08/02 11:09

>そもそもの話なのですが、FirebaseUIのTwitter認証は廃止されていますので自分で実装する必要があります そうなんですか・・・・ 今回のバグも関係あるかもですかね 試してみます
guest

回答2

0

自己解決

xcodeでクリーンビルドをしたらとりあえずバグはなくなりました・・・・
原因はわからず
回答していただいた皆様ありがとうございました。

投稿2019/08/03 02:26

takahiro00

総合スコア84

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

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

0

CocoaPodsで各種ライブラリをインストールした後は
拡張子がxcodeprojのファイルではなくxcworkspaceファイルの方を開いてください。
それでコンパイルが通ると予想しています。

投稿2019/08/01 06:39

takabosoft

総合スコア8356

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

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

takahiro00

2019/08/02 10:44

xcworkspaceファイルで開いてますがダメです。。。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問