在linux中使用TFS创建同步文件夹(Make synchronized folder with TFS in linux)
我在CentOS上的
TFS every where
使用TFS every where
,我想运行一个服务来监听目录,修改这个目录代表TFS本地文件夹,并为每个(添加或修改)它镜像到TFS我尝试使用
inotifywait
并监听事件create,modify
但是在添加目录时我感到困惑,当添加目录'ssss'时输出:
/tfs_loacl_folder/business_layer/ CREATE,ISDIR ssss /tfs_loacl_folder/business_layer/ssss/ CREATE 1 /tfs_loacl_folder/business_layer/ssss/ MODIFY 1 /tfs_loacl_folder/business_layer/ssss/ CREATE www /tfs_loacl_folder/business_layer/ssss/ MODIFY www /tfs_loacl_folder/business_layer/ssss/ CREATE 112 /tfs_loacl_folder/business_layer/ssss/ MODIFY 112 /tfs_loacl_folder/business_layer/ssss/ CREATE asd
I am using
TFS every where
on CentOS and I want to run a service to listen on directory modifying this directory represent TFS local folder and for every (add or modify) it mirroring to TFSI tried to use
inotifywait
and listen to eventcreate,modify
but I confusion when adding directory, when adding a directory 'ssss'output:
/tfs_loacl_folder/business_layer/ CREATE,ISDIR ssss /tfs_loacl_folder/business_layer/ssss/ CREATE 1 /tfs_loacl_folder/business_layer/ssss/ MODIFY 1 /tfs_loacl_folder/business_layer/ssss/ CREATE www /tfs_loacl_folder/business_layer/ssss/ MODIFY www /tfs_loacl_folder/business_layer/ssss/ CREATE 112 /tfs_loacl_folder/business_layer/ssss/ MODIFY 112 /tfs_loacl_folder/business_layer/ssss/ CREATE asd
原文:
最满意答案
用这个 :
- (void) application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo
您可以使用以检查非活动状态
if([UIApplication sharedApplication].applicationState == UIApplicationStateInactive)
Use this :
- (void) application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo
And you can check for inactive by using
if([UIApplication sharedApplication].applicationState == UIApplicationStateInactive)
相关问答
更多-
即使应用程序未启动,whatsapp如何处理APNS通知?(How whatsapp handle APNS notifications even if the app was not launched?)[2023-12-07]
您可以使用PushKit(VoIP通知)来实现此目的。 应用程序应在此之后启动一次,无论应用程序通知的状态是否会出现在设备上。 对于此类通知,应用不会要求用户确认发送通知。 You can use PushKit (VoIP notification) to achieve this. App should be launched once after that regardless of state of the app notification will appear on device. For th ... -
为什么不能处理APNS推送通知和本地通知?(Why not able to handle APNS Push notification and Local notification?)[2023-12-01]
你怎么试试didReceiveRemoteNotification函数? func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) { if(application.applicationState == UIApplicationStateBackground){ }else if(application.applicati ... -
将MQTT与APNS一起使用(Use MQTT with APNS)[2022-07-01]
Mosquitto无法在发布消息时添加挂钩,因此您无法直接在Mosquitto中执行此操作。 有2个选项 您可以在服务器上运行订阅适当通配符主题的客户端应用程序并触发APN消息。 一些其他MQTT代理支持钩子,允许您在代理中运行可用于发送APN消息的代码。 一个例子是Mosca ,它是一个javascript MQTT代理。 Mosquitto does not have a way to add hooks for when messages are published so you can not do ... -
如果应用程序断开互联网,如何再次获取设备令牌(APNS)?(If app disconnect internet, how to get device token(APNS) again?)[2021-10-28]
我想每次你的应用程序启动时,你应该注册获取设备令牌并发送到你的服务器,如果网络断开,你应该在网络访问时做上面的事情。 (如果没有网络,你获取令牌没有用,因为你无法将它发送到你的服务器,顺便说一句,系统会存储设备令牌,你可能会在注册后立即获得设备令牌) I found the resolve. Setting the code in applicationDidBecomeActive. -
你不能这是不允许的。 通过这种方式,您可以在用户不注意的情况下发送数据或数千条消息,因此Apple不允许您这样做。 You can't this is not allowed. This way you could send hunders or thousands of messages without the user noticing, thus apple does not allow you to do that.
-
问题1我们应该如何处理HEAD请求响应? (我猜测服务器能够路由HEAD请求,必须有一些更改,但我们只是假设它超出了问题的范围)。 您可能不需要处理HEAD请求。 使用Etags是一种标准机制,它允许您发出GET请求,如果没有任何更改,服务器可以返回一个空主体304响应,如果有什么内容,则返回实际新内容。 问题2我们多久要做一次这样的请求? 基于此评论,一种解决方案可以是在viewDidAppear中设置重复计时器,例如每2分钟发出一次HEAD请求。 这是一个好主意吗? 我认为这是合理的,特别是如果您想在无 ...
-
应用程序未处于活动状态时如何发送和确认服务器消息(How to send and acknoledge server message when app is not active)[2024-02-08]
您最好的选择是通过推送有效负载中的content-available密钥使用“静默”推送通知 - 此处描述 只要您的应用程序正在运行(在前台或后台),您的推送通知消息就会传递到您应用的委托对象。 在此方法中,您可以将确认发送回服务器,并在需要时显示本地通知以提醒用户。 我说这是你的“最好的选择”,因为不幸的是,如果你的应用程序没有在前台或后台运行,那么通知不会传递到你的应用程序,它只是显示为标准通知。 没有100%的方法可以知道Apple推送通知已发送到设备。 Your best bet is to use ... -
所以,起初: 用户A如何在没有互联网的情况下注销并登录Facebook? 当用户B登录时,因此连接了互联网,然后您可以发送到您的服务器:现在是此设备令牌上的userB。 例如: 用户B登录,同时服务器尝试将通知推送到用户A的电话 如果app已运行,那么您将获得APNS通知 application: (UIApplication*)app didRegisterForRemoteNotificationsWithDeviceToken: (NSData*)deviceToken 不在设备通知中心消息窗口中。 ...
-
flask apns - SysCallError:( - 1,'Unexpected EOF')(flask apns - SysCallError: (-1, 'Unexpected EOF'))[2024-02-20]
我最后修复了感谢记录消息。 要启用日志记录: import logging logging.basicConfig() 修复WARNING:apnsclient.backends.stdio:Failed to establish socket/SSL connection to ('gateway.sandbox.push.apple.com', 2195)与SSL版本3.0安全问题导致的WARNING:apnsclient.backends.stdio:Failed to establish sock ... -
用这个 : - (void) application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo 您可以使用以检查非活动状态 if([UIApplication sharedApplication].applicationState == UIApplicationStateInactive) Use this : - (void) application:(UIApplication*) ...