I have implemented Firebase in my iOS App using cocoa pods. The problem is when i try to configure firebase, i get this error Use of unresolved identifier 'FIRApp'. This error occurs when i use the code FIRApp.configure() in appdelegate file. Can anyone help me with this?
import UIKit
import AWSCore
import GoogleMaps
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let defaults = NSUserDefaults.standardUserDefaults()
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
// Use Firebase library to configure APIs
FIRApp.configure()
return true
}
}
I have followed Firebase Guide https://firebase.google.com/docs/ios/setup#initialize_firebase_in_your_app
Here is the pod file
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
use_frameworks!
target 'xxxx' do
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'DKChainableAnimationKit'
pod 'Charts'
pod 'JVFloatLabeledTextField'
pod 'AWSAutoScaling'
pod 'AWSCloudWatch'
pod 'AWSCognito'
pod 'AWSDynamoDB'
pod 'AWSEC2'
pod 'AWSElasticLoadBalancing'
pod 'AWSKinesis'
pod 'AWSMobileAnalytics'
pod 'AWSS3'
pod 'AWSSES'
pod 'AWSSimpleDB'
pod 'AWSSNS'
pod 'AWSSQS'
pod 'GoogleMaps'
pod 'Firebase'
end
I found out what was causing the problem. I was using an older version of cocoa pods. When i updated the cocoa pods version to the latest one, the error was rectified. Thanks.
just run this.
sudo gem update cocoapods