2017-08-23 16 views
0

我在涉及Firebase的应用程序中制作的,当将Firebase添加到项目时,所有预先存在的类都可以正常工作。然而,在其添加火力地堡,每当我创建一个新雨燕类(如新的UIViewController类),并导入任何火力模块后:在安装了pod之后添加的Swift类不会注册模块

import UIKit 
import Firebase //Works in files created before pods installed... 
       //...but not files created after 

class NewViewController: UIViewController { 

    override func viewDidLoad() { 
     super.viewDidLoad() 

     // Do any additional setup after loading the view. 
    } 

    override func didReceiveMemoryWarning() { 
     super.didReceiveMemoryWarning() 
     // Dispose of any resources that can be recreated. 
    } 
} 

import语句抛出“没有这样的模块火力地堡”。之前添加的所有类仍然会注册导入。我做错了什么,我该如何解决这个问题?

+0

这听起来像一个Xcode错误。你有没有试过关闭Xcode,清理你的版本,或只是重新安装pod? – DoesData

+0

@DoesData感谢您的建议。然而,我已经尝试了所有三个,而且错误依然存在。 –

回答

0

试试这个。

  • 清理您的派生数据。
  • 做一个新鲜pod install
  • 做干净的构建,然后就只是建立(CMD + B)
  • 现在添加import语句在你的班级 - import Firebase,然后就应该开始工作。