草庐IT

NOTIFICATION

全部标签

python - 使用 Python 向 Apple Notification Service 发送消息

我正在关注以下pyAPNS库提供的文档:https://github.com/djacobs/PyAPNsapns=APNs(use_sandbox=True,cert_file='ThePushCertificate.pem',key_file='ThePushKey.pem')payload=Payload(alert="Checkingifitworks",sound="default",badge=1)apns.gateway_server.send_notification(some_string,payload)我收到以下错误:SSLError:[Errno1]_ssl.c

ios - iOS 10.3 中的备用图标 : avoid notification dialog for icon change

我正在使用这个新功能,当对事件应用程序进行更改时,会显示一个通知对话框,说明图标已被修改。如何禁用此对话框? 最佳答案 如果你不介意使用私有(private)方法,你可以试试下面的代码。-(void)lc_setAlternateIconName:(NSString*)iconName{//antiappleprivatemethodcallanalyseif([[UIApplicationsharedApplication]respondsToSelector:@selector(supportsAlternateIcons)]&

ios - 如何使用从 Swift 到 Objective-C 的 Notification.Name 扩展?

我为Notification.Name创建了一个扩展,如下所示:publicextensionNotification.Name{publicstaticletblahblahblah=Notification.Name(rawValue:"blahblahblah")}现在我想在Objective-C中使用这个扩展,但即使它是公开的也无法访问。如何在Objective-C和Swift中访问和使用这个Swift扩展?以前我在Objective-C中使用常量值,但现在我正在升级我的代码并想使用这个扩展。 最佳答案 我在swift文件中

ios - Cordova 如何在 iOS 上删除 "Push notification"

我使用ApacheCordova向AppleStore提交了我的应用程序,我收到了来自苹果的警告“缺少推送通知授权”。但我似乎从未在我的应用程序中使用过“推送通知”。我怎样才能将它从我的应用程序中删除?它在ApacheCordova中是默认的吗? 最佳答案 如何“正确地”为CORDOVA应用程序执行此操作:我也遇到过这个问题。@michaelb提出的解决方案有效,但看到整个事情都包含在条件编译中(即#ifndefDISABLE_PUSH_NOTIFICATIONS),我感到非常沮丧,我决定学习如何添加“预处理器宏”,它基本上告诉XC

ios - 错误_BSMachError : (os/kern) invalid capability (20) after receiving remote notification on CloudKit record addition

当我收到关于记录添加的远程通知(调用了didReceiveRemoteNotification)时,我收到以下错误消息:_BSMachError:(os/kern)invalidcapability(20)我已经尝试在论坛和Google上找到更多相关信息,但我找不到任何适用于我的情况的有用建议。错误信息是什么意思?我该怎么办? 最佳答案 我刚刚遇到这个错误。我在UIAlert操作block中;当block退出时发生错误(顺便说一句,父UIAlertViewController是在dispatch_asyncblock中创建的,所以我

ios - iPhone : Push Notification Testing on Production Certificate

我有一个简短的问题。我一直在为我的iPhone应用程序测试开发推送通知证书,它运行良好。我只想知道在将我的应用程序提交到AppStore之前是否可以测试生产证书?我确实尝试过,但是当我使用生产证书时没有出现消息。使用productioncertificate时,Apple是否要求在AppStore上申请?谢谢。 最佳答案 如果您创建一个临时配置文件,您会发现它使用生产证书,这可能是测试它的最简单方法。更新:参见theAppledocumentationhere这有很多步骤,但本质上是这样;1)团队负责人需要创建一个新的DISTRIB

ios - Firebase 在交付到 iTunes 连接后导致问题 "Missing Push Notification Entitlement"

您可能已经知道,Google开始使用Firebase作为分析工具,所以我想在我当前的项目中使用它。我成功完成了实现并将项目上传到iTunesConnect。但是我收到了下面的邮件。我不想使用Firebase的推送通知选项,但它包含在SDK中。我需要删除它吗?如何删除?会不会导致reviewreject?Deardeveloper,Wehavediscoveredoneormoreissueswithyourrecentdeliveryfor"InstantBabyDream".Yourdeliverywassuccessful,butyoumaywishtocorrectthefoll

ios - 检测应用程序是否为 : didReceiveRemoteNotification: fetchCompletionHandler: was called by tapping on a notification in Notification Center

application:didReceiveRemoteNotification:fetchCompletionHandler:不同于application:didReceiveRemoteNotification:如何?来自文档:Unliketheapplication:didReceiveRemoteNotification:method,whichiscalledonlywhenyourappisrunning,thesystemcallsthismethodregardlessofthestateofyourapp.Ifyourappissuspendedornotrunnin

ios - "Failed to receive system gesture state notification before next touch"

我有一个带有UIScrollView的应用程序。我让IOS处理所有I/O(即,没有gesturerecognizers)。我有一只猫,它喜欢在iPad上玩耍,她能够操纵scrollview,使其在标题中出现错误。我在其他有PinchGestureRecognizer的帖子中看到了这一点。如果没有,会是什么原因造成的?什么意思?我不知道猫做了什么导致这个。她几乎可以按需完成。我根本做不到。 最佳答案 关闭多任务手势。这可以在设置面板中完成。iOS7添加了对手势的支持,可让您控制音频或查看日历。您不需要添加自己的手势识别器;操作系统自行

ios - didReceiveRemoteNotification : fetchCompletionHandler: open from icon vs push notification

我正在尝试实现后台推送通知处理,但我无法确定用户是通过发送的推送通知打开应用程序,还是通过图标打开应用程序。-(void)application:(UIApplication*)applicationdidReceiveRemoteNotification:(NSDictionary*)userInfofetchCompletionHandler:(void(^)(UIBackgroundFetchResult))completionHandler{//************************************************************//Ionly