Giter VIP home page Giter VIP logo

foregroundnotification's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @kunass2
  • ๐Ÿ‘€ Iโ€™m interested in ...
  • ๐ŸŒฑ Iโ€™m currently learning ...
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on ...
  • ๐Ÿ“ซ How to reach me ...

foregroundnotification's People

Contributors

dilizarov avatar heygul avatar kunass2 avatar thebehera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

foregroundnotification's Issues

can not handle localpushnotification

I have tried to use local BSForegroundNotification to get local push notification. But when I touched the notification, no reaction. I use this code:
_

func application (application: UIApplication, handleActionWithIdentifier identifier: String ?, forLocalNotification notification: UILocalNotification, completionHandler: () -> Void)

_
in my AppDelegate, but it still did not happen anything.
What should I do?
Thanks.

notification.presentNotification() not presenting notification?

In my AppDelegate I have the following code:

func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {

    let state = application.applicationState

    if state == .Active {
        let notification = BSForegroundNotification(userInfo: userInfo)
        notification.delegate = self
        notification.presentNotification()
    }
}

For some reason, the notification is not being presented. Is it not meant for use in AppDelegate?

Object-C

Hi, do u know if is a problem use this in a project object-c ?

Best

Install issue

Hi,

I have added "pod 'BSForegroundNotification'" in my podfile and tried to execute "pod update". Getting error

Analyzing dependencies
[!] Unable to satisfy the following requirements:

  • BSForegroundNotification required by Podfile

Thanks,
KSD

Can't open Firebase push notification

Hi there.

I am struggling with displaying push notifications sent from my Firebase console in my app. It obviously shows when my phone screen is locked, but I can't seem to get this working. I honestly have to say that I am also a bit confused, and I would really appreciate if any could help me with this.

This is some of my code in appDelegate.swift:

    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {

        let token = FIRInstanceID.instanceID().token()
        FIRMessaging.messaging().appDidReceiveMessage(userInfo)

        print(token)
        print("MessageID : \(userInfo["gcm_message_id"])")
        print(userInfo)


    }

It's in here I have put the code for the foreground push notification as well. So it looks like this:

    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {

        let token = FIRInstanceID.instanceID().token()
        FIRMessaging.messaging().appDidReceiveMessage(userInfo)

        print(token)
        print("MessageID : \(userInfo["gcm_message_id"])")
        print(userInfo)

         let notification = BSForegroundNotification(userInfo: userInfo)

        BSForegroundNotification.systemSoundID = 1004
        notification.delegate = self
        notification.presentNotification()
    }

However, this does not seem to work. Any ideas on how I would solve this?

Trigger Action

How can i trigger when user tab the notification, and the button action?

Showing Lorem Ipsum when `alert` isn't a dictionary.

The didSet of BSForegroundNotificationView's userInfo isn't exhaustive in the way it fills its UILabel's texts.
When alert is a simple String value and there's no body, it will update the titleLabel, but leave the subtitleTextView showing a Lorem Ipsum message

Not working in Foreground

Is there a method to call when the app is in a foreground and is there a way for notifications not to show when the app is in use?

Queue multiple notifications rather than displaying them simultaneously.

On screen notifications should be limited to 1 at a time. Currently they just pile on top of each other which is not ideal. Instead, notifications should be added to a queue, which would be responsible for presenting the next notification from the queue once the previous one has been dismissed. Doing this fixes:

  • Notifications piling up and becoming hard to read because of view transparency.
  • User being interrupted from his interaction with the first notification.
  • UIStatusBar hide/unhiding bug. Currently once the first notification disappears, the status bar is unhidden.... even if a new notification is already on screen.
  • Inconsistency from the way Apple displays push notifications (they use a queue).

Increase the size of the "send" button for TextInput actions

Problem
When attempting to "send" user inputted text for a notification uses .TextInput actions, it's too easy to accidentally dismiss the notification rather than triggering application(application:, handleActionWithIdentifier:, forRemoteNotification:, withResponseInfo: , completionHandler:
If the notification is accidentally closed, the user has lost all of his inputted text and there is no way to recover it... it's a waste of time for the user + the user will believe that it has worked properly. This is really the biggest issue here... I discovered this the hard way. It's essentially a false positive.

Solution
Increase the the size of the "send" button so that tapping anywhere near the "send" text will trigger the expected chain of events rather than closing the notification.

Swift 3.0

Are you planning on making this compatible with Swift 3.0?

pod is still at v1.9.1

adding pod "BSForegroundNotification" to podfile retrieves older 1.9.1 not a newer 2.0 version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.