pikacode / ebforenotification Goto Github PK
View Code? Open in Web Editor NEWNo more update, please use new pod ‘EBBannerView’ 不再更新,请使用新库 https://github.com/pikacode/EBBannerView
License: MIT License
No more update, please use new pod ‘EBBannerView’ 不再更新,请使用新库 https://github.com/pikacode/EBBannerView
License: MIT License
This NSDictionary *infoDictionary = [[NSBundle bundleForClass:[self class]] infoDictionary];
should be like this: NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
in order for the app name to be inserted in the notifications, otherwise EBForeNotification is inserted.
hello ,iOS环境下,EBForeNotification和极光推送混用的时候,在杀死程序的情况下收到远程推送会闪退.望解决.在前台的时候暂时没有发现问题,望解决一下
您好,非常喜欢您写的插件,谢谢分享,,
问一下 控件 展示时间默认多少,可以配置吗,或者可以配置不自动消失吗?
UIAlerView在屏幕中间时,展示EBBannerView,UIAlertView的位置偏移到了左上角。
@pikacode Why is the notification time a constant string with (I'm guessing) chinese characters? Why doesn't it read the current time? Are we supposed to set it somehow?
The fonts for the iOS10 style notification are wrong:
The title should be System Light 13, and the message System Regular 15. Please update these to achieve a more authentic experience for the users.
[__NSCFDictionary length]: unrecognized selector sent to instance 0x157a98e0
我的系统是iOS9.2.1
有的应用BundleDisplayName才是真正显示的App应用名,Bundle name则采用工程名或者开发内部自定义名字。我不知道有多少应用是这样子,或者你开放API让开发者自己选择,显示的内容(图标和App名称)。THX!
ps:EBForeNotification抛砖引玉,告诉我一种实现的方向,感谢!
Crash on EBBannerView.m line 171
Fatal Exception: NSInvalidArgumentException
-[SKProductInternal frame]: unrecognized selector sent to instance 0x1700959a0
Crash log:
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x186872fd8 __exceptionPreprocess
1 libobjc.A.dylib 0x1852d4538 objc_exception_throw
2 CoreFoundation 0x186879ef4 __methodDescriptionForSelector
3 CoreFoundation 0x186876f4c ___forwarding___
4 CoreFoundation 0x186772d2c _CF_forwarding_prep_0
5 UIKit 0x18c99a88c -[UIView(Geometry) frame]
6 MyApp 0x10009f634 __35-[EBBannerView removeWithAnimation]_block_invoke (EBBannerView.m:171)
7 UIKit 0x18c9d74b8 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:]
8 UIKit 0x18cb1baf4 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:animations:completion:]
9 MyApp 0x10009f4d8 -[EBBannerView removeWithAnimation] (EBBannerView.m:189)
10 Foundation 0x187367760 __NSFireTimer
11 CoreFoundation 0x186821a9c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
12 CoreFoundation 0x1868217a0 __CFRunLoopDoTimer
13 CoreFoundation 0x186821060 __CFRunLoopDoTimers
14 CoreFoundation 0x18681ec84 __CFRunLoopRun
15 CoreFoundation 0x18674ed94 CFRunLoopRunSpecific
16 GraphicsServices 0x1881b8074 GSEventRunModal
17 UIKit 0x18ca07130 UIApplicationMain
18 MyApp 0x100096da0 main (main.m:14)
19 libdyld.dylib 0x18575d59c start
i use it in a swift project
2016-08-10 16:59:45.948 qapp[44969:5712768] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/Library/Developer/CoreSimulator/Devices/D563093A-7F5F-4D40-84DD-94A63E13590E/data/Containers/Bundle/Application/4229F90D-0DE7-48E8-869A-AC88D517D747/qapp.app> (loaded)' with name 'EBBannerView''
*** First throw call stack:
(
0 CoreFoundation 0x00000001069acd85 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108750deb objc_exception_throw + 48
2 CoreFoundation 0x00000001069accbd +[NSException raise:format:] + 205
3 UIKit 0x000000010759cc89 -[UINib instantiateWithOwner:options:] + 499
4 UIKit 0x000000010759f415 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 223
5 EBForeNotification 0x00000001062c48c7 +[EBForeNotification showBannerWithUserInfo:soundID:isIos10:] + 199
6 EBForeNotification 0x00000001062c4595 +[EBForeNotification handleRemoteNotification:soundID:isIos10:] + 517
7 qapp 0x0000000105f2fbaf TFC4qapp4Core16showNotificationfCSo8NSStringT + 655
8 qapp 0x0000000105f467e0 TFC4qapp13setcustomtime9tableViewfTCSo11UITableView23didSelectRowAtIndexPathCSo11NSIndexPath_T + 496
9 qapp 0x0000000105f468ef TToFC4qapp13setcustomtime9tableViewfTCSo11UITableView23didSelectRowAtIndexPathCSo11NSIndexPath_T + 79
10 UIKit 0x000000010731c1c6 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1887
11 UIKit 0x000000010731c41b -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 388
12 UIKit 0x00000001071e0f62 _runAfterCACommitDeferredBlocks + 317
13 UIKit 0x00000001071f4e4c _cleanUpAfterCAFlushAndRunDeferredBlocks + 95
14 UIKit 0x0000000107201147 _afterCACommitHandler + 90
15 CoreFoundation 0x00000001068d1c37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
16 CoreFoundation 0x00000001068d1ba7 __CFRunLoopDoObservers + 391
17 CoreFoundation 0x00000001068c77fb __CFRunLoopRun + 1147
18 CoreFoundation 0x00000001068c70f8 CFRunLoopRunSpecific + 488
19 GraphicsServices 0x000000010a7e3ad2 GSEventRunModal + 161
20 UIKit 0x00000001071d4f09 UIApplicationMain + 171
21 qapp 0x0000000105f51002 main + 114
22 libdyld.dylib 0x000000010da6892d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
横屏通知显示仍是竖屏样式
情景:当推送过来的时候,我调用了作者的框架,如果此时的页面上有一个弹窗,系统的弹窗会显示到左上角
请问是否必须要指定一种声音?即使用户静音状态下也会收到提示音,这样似乎体验不好
2.监听点击弹窗的事件、用户点击以后可以取到推送内容、通过自定义推送中的 extra 字段处理自己的逻辑。如:
add observer for "EBBannerViewDidClick", handle extra key/value
{
{
aps:"alert":"推送内容",
"sound":"sound",
"badge":"3"
},
"key1":"跳转页面1" //自定义此字段以跳转到相应页面
}
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(eBBannerViewDidClick:) name:EBBannerViewDidClick object:nil];
-(void)eBBannerViewDidClick:(NSNotification*)noti{
if(noti[@"key1" == @"跳转页面1"]){
//jump to page 1
}
}
按照方法执行的,但是 noti获取是null
Notification 'alert' key can be both a string and a dictionary.
When sending the following notification:
{"aps" : { "alert" : { title: "title", body: "text" } } }
The application crashes on:
File: EBBannerView.m
-(NSString*) extractContentLabel:(NSDictionary*)userInfo{
@throw [NSException exceptionWithName:NSInvalidArgumentException
reason:@"aps['alert'] field malformed: it is neither a string nor a dictionary with key 'loc-key'"
userInfo:nil];
Maybe it's a good idea never throw exceptions in production? It's good for debugging, but in production maybe the best thing would be logging it and not crashing the whole app.
Thanks! :)
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.