Follow below steps for the setup push notifications.
-
Open firebase console and create new project. https://console.firebase.google.com
-
Setup your project in Setting and upload .p12 certificate in cloud messaging sections.
-
Add PushNotification.swift file into your project.
-
Write below code into your appdelegate method.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. PushNotification.setupForPushNotiFication(application: application) { (isGranted) in print(isGranted) } return true}
-
Run your project in ios Device and allow push notification service.
-
Send Push notification from firebase console.
Stay connected with us for get custom classes for the ios Development.
Thanks