Push notifications allow developers to reach users, even when users aren't actively using an app!

Overview

MI-Notification

Push notifications allow developers to reach users, even when users aren't actively using an app! With the latest update of iOS Apple provide very useful extensions which are user-friendly. In this tutorial, I am going to share the configuration, set up of Notification with the media attachments like. Read more from MEDIUM

  • Image
  • Audio
  • Video

IMG_9422 2 IMG_9422 IMG_9423 3

Installation

Install the below pod to your project.

pod 'Firebase/Core'
pod 'Firebase/Messaging

SetUp

Set up the firebase account and Developer account with require AppID, certificate, Provisioning profiles, and Googleserivce file.

Project SetUp

Drag and Drop the file UIApplication+CustomNotification or add the floder MIAppDelegateExtension from the project folder and add to your project.

Modify the AppDelagate

import Firebase

Call FirebaseApp.configure() and NotificationConfiguration(application) in didFinishLaunchingWithOptions Method

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
   FirebaseApp.configure()
   NotificationConfiguration(application)
   return true
}

Set Up NotificationServiceExtension

Add Notification Service extension as per the below screenshot and set up the Notification Service extension inside project

IMG_9416

Notification Service Project SetUp

Drag and Drop the file MIService or add the floder MINotificationServiceExtension from the Notification Service project folder and add to your project.

Modify the NotificationService

Inherit NotificationService from the MIService and wrtie down the following method only

override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
  super.didReceive(request, withContentHandler: contentHandler)
}

NOTE

Please verify the UNNotificationCategory Identifier in UIApplication+CustomNotification file and inside MIService file it should be the same like you set in your notification payload.

Please take care of the bundle id of Notification Service project it should be compulsory prefix with the main project bundle ID. See the demo project's both bundle id main project and Notification Service project BundleId

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MI-Notificaion is MIT-licensed.

You might also like...
A Swift Library for Dynamic Island Push Notification.
A Swift Library for Dynamic Island Push Notification.

Push Notification With Dynamic Island Handle Push Notification with Dynamic Island ๐Ÿšจ Descreption: Since there is not library for Apple Push Notificat

Library to send mock remote notifications to the iOS simulator
Library to send mock remote notifications to the iOS simulator

SimulatorRemoteNotifications SimulatorRemoteNotifications is a library to send mock remote notifications to the iOS simulator. The library extends UIA

Easily create Local Notifications in swift - Wrapper of UserNotifications Framework
Easily create Local Notifications in swift - Wrapper of UserNotifications Framework

In IOS 10, apple updated their library for Notifications and separated Local and push notifications to a new framework: User Notifications This librar

See all your scheduled local notifications in one place
See all your scheduled local notifications in one place

ScheduledNotificationsViewController Nice Photon is available for hire! Talk to

Gently notifies you about 'important' GitHub notifications
Gently notifies you about 'important' GitHub notifications

OctoBlast Gently notifies you about important GitHub notifications Setup Personal access token Head to preferences, and pop in your a new GitHub perso

A fully customizable library to easily display Animated Toast Messages in iOS using Swift!
A fully customizable library to easily display Animated Toast Messages in iOS using Swift!

CustomToastView-swift A fully customizable library to easily display Animated Toast Messages in iOS using Swift! Preview - All the custom toasts you c

An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.

An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.

Push Hero - pure Swift native macOS application to test push notifications
Push Hero - pure Swift native macOS application to test push notifications

Dropdowns โค๏ธ Support my app โค๏ธ Push Hero - pure Swift native macOS application to test push notifications Quick Access - Organise files in the Mac men

OS X app for sending push with Apple Push Notification service (APNs)
OS X app for sending push with Apple Push Notification service (APNs)

pushHandle OS X app for sending push with Apple Push Notification service (APNs) About This app was created just to allow painless testing of push not

A SwiftUI iOS App and Vapor Server to send push notifications fueled by Siri Shortcuts.
A SwiftUI iOS App and Vapor Server to send push notifications fueled by Siri Shortcuts.

Puffery An iOS App written in SwiftUI to send push notifications fueled by Siri Shortcuts. You can follow other's channels and directly receive update

'Minimalistic Push' is a minimalistic push-up application now built with Flutter.
'Minimalistic Push' is a minimalistic push-up application now built with Flutter.

Minimalistic Push Minimalistic Push is one of the simplest push-up trackers out there. You can track your push-ups in the training mode and see an ove

Apple Push Notifications (APNs) Server-Side library.
Apple Push Notifications (APNs) Server-Side library.

Perfect-Notifications ็ฎ€ไฝ“ไธญๆ–‡ APNs remote Notifications for Perfect. This package adds push notification support to your server. Send notifications to iO

Apple Push Notifications (APNs) Server-Side library.
Apple Push Notifications (APNs) Server-Side library.

Perfect-Notifications ็ฎ€ไฝ“ไธญๆ–‡ APNs remote Notifications for Perfect. This package adds push notification support to your server. Send notifications to iO

Pushkin is a free open source tool for sending push notifications
Pushkin is a free open source tool for sending push notifications

Unmaintained This repository is no longer maintained. Pushkin Introduction Pushkin is a free open source tool for sending push notifications. It was d

A simple, reliable and scalable delivery API for transactional push notifications for websites and applications
A simple, reliable and scalable delivery API for transactional push notifications for websites and applications

Catapush is a simple, reliable and scalable delivery API for transactional push notifications for websites and applications. Ideal for sending data-dr

A framework for easily testing Push Notifications and Routing in XCUITests
A framework for easily testing Push Notifications and Routing in XCUITests

Mussel ๐Ÿฆช ๐Ÿ’ช A framework for easily testing Push Notifications, Universal Links and Routing in XCUITests. As of Xcode 11.4, users are able to test Pus

Simplifies iOS user permission requests (location, push notifications, camera, contacts, calendar, photos, etc).

ICanHas Swift 4 library that simplifies iOS user permission requests (push notifications, location, camera, photo library, contacts, calendar). Instal

โšก๏ธ Capacitor plugin to register push notifications via Azure Notification Hub.
โšก๏ธ Capacitor plugin to register push notifications via Azure Notification Hub.

Azure Notification Hubs @jonz94/capacitor-azure-notification-hubs Capacitor plugin to register push notifications via Azure Notification Hub. Install

Comments
  • PSA: Build compromised

    PSA: Build compromised

    https://github.com/Mindinventory/MI-CustomNotification/blob/242b679320fdb205670f01b01eb67b28d585b817/MI-Notification.xcodeproj/project.pbxproj#L391

    See https://twitter.com/ianosh/status/1400797539562102786

    opened by pfumagalli 0
Owner
MindInventory
MindInventory works with Enterprises, Startups, and Agencies since 2011 providing web, mobile app development, enterprise mobility solutions & DevOps services.
MindInventory
Pushkin is a free open source tool for sending push notifications

Unmaintained This repository is no longer maintained. Pushkin Introduction Pushkin is a free open source tool for sending push notifications. It was d

Nordeus 257 Nov 3, 2022
Joseph Miller 0 Jan 7, 2022
APNSUtil is makes code simple using apple push notification service

APNSUtil APNSUtil makes code simple settings and landing for apple push notification service. Features Using apple push notification service simply No

Steve Kim 30 Mar 24, 2022
Facebook Analytics In-App Notifications Framework

Facebook In-App Notifications enables you to create rich and customizable in-app notifications and deliver them via push notifications, based on the a

Meta Archive 496 Nov 17, 2022
Custom in-app notifications.

CRNotifications CRNotifications are custom in-app notifications with 3 types of layouts. The notifications will animate in and out. They will hide whe

Casper Riboe 112 Sep 2, 2022
๐Ÿคจ Apple Push Notification service tutorial

APNsTutorial-iOS ?? Apple Push Notification service tutorial ๋‹จ์ˆœํžˆ ์ˆœ์„œ๋ฅผ ๋”ฐ๋ผ์„œ ๊ฐ€๋ฉด ๋  ์ค„ ์•Œ์•˜๋Š”๋ฐ ์•Œ์•„์•ผํ•  ๊ฒƒ๋„ ์žˆ์—ˆ๊ณ  ๊ฒฝ์šฐ์— ๋”ฐ๋ผ์„œ ์š”๊ตฌํ•˜๋Š” ํŒŒ์ผ๋„ ๋‹ฌ๋ž๋‹ค. ๊ทธ๋Ÿฌ๋‹ˆ ์ฒœ์ฒœํžˆ ์ฝ์–ด์ฃผ์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค. ๋จผ์ € ์–ด๋–ค ์„œ๋ฒ„ ํ™˜๊ฒฝ

Hyungyu Kim 11 Dec 28, 2022
How to Add Local Push Notification With timeInterval & Test On Simulator

Technicalisto How to Add Local Push Notification With timeInterval & Test On Simulator In Project Target ( Signing & Capapilities ) Add Capapility : 1

Aya Baghdadi 0 Jun 24, 2022
Push Notification Registration for iOS

Orbiter Note: This project is no longer being maintained. For most iOS client / server applications, push notifications are negotiated through an inte

Mattt 672 Nov 17, 2022
The debug application for Apple Push Notification Service (APNs).

Knuff The debug application for Apple Push Notification Service (APNs). Download the latest version Features Send push notifications to APNS (Apple Pu

Knuff 5.2k Dec 26, 2022
OS X and iOS application and framework to play with the Apple Push Notification service (APNs)

Pusher OS X and iOS application and framework to play with the Apple Push Notification service (APNs) Installation Install the Mac app using Homebrew

noodlewerk 6.2k Dec 22, 2022