Google Firebase
Install
- Install Firebase form Pod
pod 'Firebase'
- Download GoogleService-info.plist and add it into your project.
To download a config file for an iOS app:
- Sign in to Firebase and open your project.
- Click
and select Project settings.
- In the Your apps card, select the bundle ID of the app you need a config file for from the list.
- Click
GoogleService-Info.plist .
Import Firebase
- In your Application Delegate file
import Firebase
- In your
application:didFinishLaunchingWithOptions
method, create a Firebase shared instance.
FIRApp.configure()
Pod availabale packages |
---|
Pod | Services |
---|---|
pod 'Firebase/Core' | Only Analytics |
pod 'Firebase/AdMob' | AdMob |
pod 'Firebase/Messaging' | Cloud Messaging / Notifications |
pod 'Firebase/Database' | Realtime Database |
pod 'Firebase/Invites' | Invites |
pod 'Firebase/DynamicLinks' | Dynamic Links |
pod 'Firebase/Crash' | Crash Reporting |
pod 'Firebase/RemoteConfig' | Remote Config |
pod 'Firebase/Auth' | Authentication |
pod 'Firebase/AppIndexing' | App Indexing |
pod 'Firebase/Storage' | Storage |
Debug 打印信息
Produst > Scheme > Edit scheme > Run > Arguments > Arguments Passed On launch :
-FIRAnalyticsDebugEnabled