Custom in-app notifications.

Last update: Jan 9, 2022

CRNotifications

CRNotifications are custom in-app notifications with 3 types of layouts. The notifications will animate in and out. They will hide when they are clicked on or with an automatic dismissal.

Screenshots


Notifications types
Success Error Info
alt text alt text alt text

How to use


Call CRNotifications.showNotification with a title, message, notification type and a time for how long the notification should appear. Should the notification not disappear automatically use a time of 0. You may also pass a completion block that is executed once the notification disappears.

Built-in notification types are : .success .error .info

Example:

CRNotifications.showNotification(type: CRNotifications.success, title: "Success!", message: "You successfully showed this notification.", dismissDelay: 3)

It is also possible to customize the notifications and provide your own custom style either by the method

showNotification(textColor:, backgroundColor: UIColor, image: UIImage?, title: String, message: String, dismissDelay: TimeInterval)

or by conforming to the CRNotificationType protocol:

protocol CRNotificationType {
    var textColor: UIColor { get }
    var backgroundColor: UIColor { get }
    var image: UIImage? { get }
}

Installation


Cocoapods install

Swift 5
pod 'CRNotifications'
Swift 4.2
pod 'CRNotifications', :git => 'https://github.com/dkcas11/CRNotifications.git', :branch => 'swift4-2'
Swift 3
pod 'CRNotifications', :git => 'https://github.com/dkcas11/CRNotifications.git', :branch => 'swift3'

Manual install

Drag the CRNotifications folder into your project and you are good to go.

Author & Contributors


Casper Riboe (Author)

Facebook : Casper Riboe
Twitter : dkcas11
Mail : [email protected]

Herrick Wolber (Contribution)

Twitter : estar2005
Github : Rico237
Mail : [email protected]

GitHub

https://github.com/dkcas11/CRNotifications
Comments
  • 1. Custom Background Color and swipe up

    Hey

    this library works great for my project. However the styles don't fit the theme of my App. So I build a little extension that allows to pass a custom background color.

    This is more a solution to get my problem fixed. A better solution might be, to let the CRNotificationType be a Class that include the color (and maybe border, shadows, etc.). There could be a couple of static variables that return the defaults for info, error, etc., that will be passed as a parameter, but user could still create a new instance with custom properties. I could work on something like this, if you see this benefitial.

    Reviewed by xremix at 2018-03-29 08:54
  • 2. New logo/Icon

    Hi, I am a graphic designer, I want to help others in graphic design.

    After I reviewed your project, your logo on this project not attractive . Therefore I want to contribute to this project by creating a new logo / icon. what do you think?

    Reviewed by mansya at 2018-06-22 02:52
  • 3. issue when i try present CRNotifications

    u've issue when i try display CRNotifications

    in this class CRNotifications

    UIApplication.shared.keyWindow?.rootViewController.view.addSubview(view) but i fix it .....

    adding parms showNotification(type: CRNotificationType, title: String, message: String, dismissDelay: Int , viewController : UIViewController )

    because when i try implement pushView controller or segue the CRNotifications Displayed in the previous VC

    so... viewController.view.addSubview(view)

    it's work

    Reviewed by adelbios at 2017-06-21 00:30
  • 4. Add possibility to react to notification tap via new CRNotificationDelegate

    I think this is a neat little functionality expanding the cool & simple to use CRNotification! :) It also does not change the API so it is backwards compatible, only if needed, a delegate can be set. It is also very simple to comply with the delegate.

    If you want a more fancy feature, one could also include the text (or other information) of the notification in the delegate call.

    As this is my first pull request on GitHub, please take a look and let me know if I need to improve something or if you don't like the feature 😄

    Reviewed by sansha at 2019-07-28 14:12
  • 5. Enhancement request - show more then 2 lines of text

    Love this, but would like to be able to show a larger box with more lines of text for some notifications. Can you modify it so the box resizes automatically based on the length of the message text, please?

    Reviewed by saldous at 2017-09-25 16:56
  • 6. Added Swift version to podspec

    CRNotifications will not build for me in Xcode 10.1 unless I manually change the Swift version in the pod settings. This PR fixes it by specifying the swift version in the podspec.

    Reviewed by mplorentz at 2018-12-11 21:43
  • 7. Spring cleaning and protocols

    • Changed the CRNotificationType from an enum to a protocol allowing for customisation.
    • Added a swipe gesture recogniser to the the CRNotification view for dismissal.
    • Updated the CRNotification view's constraints for better layout on different screens.
    Reviewed by dkcas11 at 2018-04-17 16:09
Push notifications allow developers to reach users, even when users aren't actively using an app!
Push notifications allow developers to reach users, even when users aren't actively using an app!

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.

Mar 3, 2022
Facebook Analytics In-App Notifications Framework
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

Mar 6, 2022
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

May 27, 2022
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

Mar 13, 2022
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

Jun 21, 2022
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

Jun 19, 2022
Custom notification view
Custom notification view

Custom notification view

Nov 11, 2021
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

Nov 7, 2021
Custom in-app notifications.
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

Jan 9, 2022
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

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

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.

Mar 3, 2022
Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside
Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside

Description ?? Break the silence of your UI, whispering, shouting or whistling at it. Whisper is a component that will make the task of displaying mes

Jun 11, 2022
Simple Swift in-app notifications
Simple Swift in-app notifications

LNRSimpleNotifications TSMessages is an amazingly powerful in-app notifications library but requires a lot of setup. LNRSimpleNotifications is a simpl

Feb 11, 2022
Facebook Analytics In-App Notifications Framework
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

Mar 6, 2022
CoffeeToast - A swift package to easily add Toast notifications to your app

CoffeeToast A simple Swift package to add Toast Notifications to your app. Insta

Feb 3, 2022
Koronavilkku - the official COVID-19 Exposure Notifications app

Koronavilkku iOS app Koronavilkku is the official COVID-19 Exposure Notifications app for Finland, maintained by the Finnish Institute for Health and

Jun 17, 2022
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

Apr 27, 2022
A simple style messages/notifications, in Swift.
A simple style messages/notifications, in Swift.

Demo Example To show notifications use the following code: self.showMessage("Something success", type: .success) To display a notice on a view: view.s

Jun 5, 2022
SwiftOverlays is a Swift GUI library for displaying various popups and notifications
SwiftOverlays is a Swift GUI library for displaying various popups and notifications

SwiftOverlays is a Swift GUI library for displaying various popups and notifications. SwiftOverlays animated logo is kindly made by Crafted Pixels Fea

May 28, 2022
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

Apr 27, 2022