Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Configure first service firebase
- let filePath1 = Bundle.main.path(forResource: "GoogleService-Info", ofType: "plist")
- guard let fileopts1 = FirebaseOptions(contentsOfFile: filePath1!)
- else { assert(false, "Couldn't load config file") }
- FirebaseApp.configure(name: "first", options: fileopts1)
- //Configure second service firebase
- let filePath = Bundle.main.path(forResource: "GoogleService-Cuarto", ofType: "plist")
- guard let fileopts = FirebaseOptions(contentsOfFile: filePath!)
- else { assert(false, "Couldn't load config file") }
- FirebaseApp.configure(options: fileopts)
- Messaging.messaging().delegate = self
- if #available(iOS 10.0, *) {
- // For iOS 10 display notification (sent via APNS)
- UNUserNotificationCenter.current().delegate = self
- let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
- UNUserNotificationCenter.current().requestAuthorization(
- options: authOptions,
- completionHandler: {_, _ in })
- } else {
- let settings: UIUserNotificationSettings =
- UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
- application.registerUserNotificationSettings(settings)
- }
- application.registerForRemoteNotifications()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement