leonatan / lnnotificationsui Goto Github PK
View Code? Open in Web Editor NEWA framework for displaying notifications similar to Apple's iOS 8 and iOS 9 notifications.
License: MIT License
A framework for displaying notifications similar to Apple's iOS 8 and iOS 9 notifications.
License: MIT License
'/Users//Documents//Carthage/Build/iOS/LNNotificationsUI.framework/LNNotificationsUI' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture arm64
Swipe the notification to ignore always acts like tapping.
I want to make the ship gesture very smooth so if user intends to ignore the message its not forcing him to enter.
Its erratic many times that ship is not smooth and always gets tapped.
Can we have the fix for this please.
Hi, I am new to iOS programming and using swift for my app.
I am using LNNotification for remote notification. My requirement is to navigate to a view controller when user tabs on a notification. Can you please some sample or example for this in swift ?
Thanks
Ash
In my head, the little drawer at the bottom is there to pull it down and reveal the full notification center on iOS. since this is not the case with this lib, I would like to hide it. Are you interested in a PR that adds a setting to disable it?
Thanks!
After researches, seem the problem is due to a missing code after the AVPlayer is stopped.
Suggestion:
add
[[AVAudioSession sharedInstance] setActive:NO withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil];
in - (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag
of LNNotificationCenter
Hey there,
How about making the following properties public so that they can be modified?
static const NSTimeInterval LNNotificationAnimationDuration = 0.5;
static const NSTimeInterval LNNotificationFullDuration = 5.0;
static const NSTimeInterval LNNotificationCutOffDuration = 2.5;
I'm creating a Chat application, something similar to WhatsApp. Having the default duration of 5.0 and a cut off time of 2.5 is too long for me, especially if the user sends let's say 10 one line messages at once.
Also, is there a way to cancel notifications that haven't been shown yet? I don't want the notification to show if the user is in a specific section of my app. I want to cancel all the pending notifications in that case.
Thanks for making this open source btw!
There isn't method call 'makeKeyAndVisible'
Would be cool to push to cocoapods, currently pulling it directly from the github repo.
Thanks!
Hi I am getting this error while installing through pods, this suddenly stopped. Can you please help as this app is in Appstore now and have to release the update.
[!] /usr/bin/git clone https://github.com/CodeEagle/LNNotificationsUI.git /var/folders/hv/xz_d5sf534s2t3c_xb2fx_4h0000gn/T/d20160316-6150-1kzwn8e --single-branch --depth 1 --branch 0.0.1
Cloning into '/var/folders/hv/xz_d5sf534s2t3c_xb2fx_4h0000gn/T/d20160316-6150-1kzwn8e'...
remote: Repository not found.
fatal: repository 'https://github.com/CodeEagle/LNNotificationsUI.git/' not found
Hello LeoNatan,
I have used this in my Live app and currently facing some issues.
Our entire app is locked to Portrait orientation but the LNNotification gets rotated.
Ive used the pods and hence if I update he Pods then the code will be overwritten by the latest for the changes I make.
Can you provide a function to pass the orientation locked and Type (Landscape / Portrait) while registering this LNNotification View.
I would like to detect when the user swipes away a message in order to cancel all pending notifications. Is it possible to detect this status?
It would be really nice to, somehow, be able to attach a user info dictionary to a notification.
One solution is to add a method - (void)presentNotification:(LNNotification*)notification forApplicationIdentifier:(NSString*)appIdentifier userInfo:(NSDictionary*)userInfo
to LNNotificationCenter
.
Another solution would be to add a userInfo
property to LNNotification
, and update initialisers as well.
I would prefer the first solution, as it is like poster a notification to NSNotificationCenter
. In this case, the user info would become the NSNotification
's user info, when the LNNotification
is tapped.
It would be great if such one, similar to the one used by the Messages app, could be added.
Thanks for this really great library!
It can be used in iOS7 with small fixes. Don't you have plan to support iOS7 too?
without a LICENSE file, we have to assume you're fully copyrighting this software.
given that you've open sourced it, i'm hoping you meant to release with something like an MIT license
Also:
[UIImage imageNamed:@"LNNotificationsUIDefaultAppIcon"]
won't work when lib used as framework.
Hi @LeoNatan , i've got an error:
dyld: Library not loaded: @rpath/LNNotificationsUI.framework/LNNotificationsUI
Referenced from: /private/var/mobile/Containers/Bundle/Application/8D250AEC-6661-423F-8391-CA4719E9F3D8/xxxxx.app/xxxxx
Reason: image not found
I've followed ur steps to add LNNotificationsUI.xcodeproj
to my project, and added LNNotificationsUI.framework
& LNNotificationsUIAssets.xcassets
to the right place as below:
And idea about this?
My envir is Xcode 6.0.1 (6A317) / Xcode 6.1 (6A1046a) with iOS 8 SDK. Target device is iPad 3 (simulator works).
you have a user tapped function which can be used to stop sound etc.. I am wondering if I can instantiate a view controller from this function... as in when I click the notification I should be able to navigate to another window .. how to achieve this?
+ (instancetype)notificationWithMessage:(NSString*)message title:(NSString*)title icon:(UIImage*)icon date:(NSDate*)date
{
return [[LNNotification alloc] initWithMessage:message title:title icon:icon date:[NSDate date]]; // <---- date not passed
}
Hello Leo,
I understand that you have stopped support for adding feature as IOS 10 already is coming with thsi implementation.
I have followed your instructions to add this library as I need this for my app which support 8.0 OS also so cannot use apples UsernotificationCenter component which is IOS 10.0 and above.
I am facing the module not found even if adding the library as project
I get the Module not found error still. Can help on this please.
In the LNNotificationsUI.podspec.json file, can you fix the source-> git url ?
"https://github.com/CodeEagle/LNNotificationsUI.git" is shown like a not founded url.
Thanks!
Do you have any plan for support the cocoa pod or carthage? Thanks.
frameworks are only supported on iOS 8.0 and later. embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/LNNotificationsUI.framework/LNNotificationsUI) for architecture arm64
Is it possible to compile it for iOS7 ?
Thanks
I can't figure out how to hide an LNNotification once it has been shown.
In the same way you can pull down on system notifications to display action buttons, it would be great if we could do the same here, rather than only allowing action buttons in Alert style
Looks like NSNotification was swapped by defaultAction
, so we need to update the doc to reflect this.
Hi, @LeoNatan, thanks this framework.
When I show the notification the status bar color is changing.
Do you know why is this happening?
I'm getting an invoke_block error in iOS9 at the code below. Will this code be optimized for use in iOS9? Thanks.
LNNotificationAppSettings.h
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
LNNotificationAppSettings* __strong* rv = (LNNotificationAppSettings*_)&LNNotificationDefaultAppSettings;
*rv = [LNNotificationAppSettings new];
(_rv).alertStyle = LNNotificationAlertStyleBanner;
(*rv).soundEnabled = YES;
});
If you compile project just adding all LNNotificationsUI *.h and *m files to the project, +[LNNotificationAppSettings load] crashes on line initialising LNNotificationDefaultAppSettings pointer with BAD ACCESS exception. It seems like compiler puts const LNNotificationDefaultAppSettings pointer to read only memory segment. Removing const in LNNotificationDefaultAppSettings fixes crash. Would you accept pull request with such fix?
Hi, @LeoNatan . Do you have plans publish your great framework to cocoa pods?
Hi @LeoNatan,
I'm having an issue if I attempt to display a notification while the hotspot banner is active. It shows up correctly but after it animates away it gets stuck. Can you replicate the results ?
In LNNotificationCenter.m
// While _notificationSettings type is NSMutableDictionary the following method will return NSDictionary
_notificationSettings = [[NSUserDefaults standardUserDefaults] valueForKey:_LNSettingsKey];
if(_notificationSettings == nil)
{
_notificationSettings = [NSMutableDictionary new];
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.