Skip to content

You can use this framework to show notifications inside your iOS app

License

Notifications You must be signed in to change notification settings

arnold-plakolli/InAppNotification

Repository files navigation

InAppNotification

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate InAppNotification into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'InsideAppNotification'
end

Then, run the following command:

$ pod install

Usage

import InsideAppNotification
let data: [String: Any] = []

let resource: URL = URL(string: "some_url_here") // You can also put here UIImage or Data that can be converted to UIImage

let notification: InAppNotification = InAppNotification(
	resource: resource,
	title: "Notification title", 
	subtitle: "Notification details", 
	data: data
)

InAppNotificationDispatcher.shared.show(
    notification: notification,
    clickCallback: { (_notification) in
        print("Notification clicked. Data: \(_notification.data)")
    }
)

License

InAppNotification is released under the MIT license. See LICENSE for details.