Posts

Post not yet marked as solved
9 Replies
1.5k Views
Hello everyone, I have been working on a macOS app that utilizes push notifications for the past year. Up until recently, everything was functioning correctly. However, now I'm experiencing issues where push notifications are either not being delivered at all or are experiencing significant delays, sometimes up to 10 minutes. Setting the priority header to 10 hasn't made any difference. I am currently using development push notifications, but the issue persists when switching to the production environment. I'm curious if anyone else has encountered similar problems. When checking the push console, it frequently reports that the device is offline, even though it's actually online ("discarded as device was offline"). Occasionally, notifications are delivered promptly, but this is becoming increasingly infrequent. This issue has been consistently reported by our testers, particularly after they updated to macOS Sonoma. Any insights or assistance you can provide would be greatly appreciated.
Posted
by XVC_.
Last updated
.
Post not yet marked as solved
0 Replies
302 Views
Hello everyone, I’m currently working on a project where I need to simulate mouse drag and drop events in MacOS using Swift. I have written the following code which works well in most applications, but I’m encountering issues in some applications like Finder where the leftMouseDragged event doesn’t seem to work correctly. Click events are working fine everywhere. Here’s the code I’m using for the drag event: let location = CGEventTapLocation.cghidEventTap let source = CGEventSource.init(stateID: .combinedSessionState) let clickAtStart = CGEvent(mouseEventSource: source, mouseType: .leftMouseDown, mouseCursorPosition: locationPoint , mouseButton: .left) let dragAndDrop = CGEvent(mouseEventSource: source, mouseType: .leftMouseDragged, mouseCursorPosition: locationPointDrag, mouseButton: .left) clickAtStart?.post(tap: location) usleep(200000) dragAndDrop?.post(tap: location) And analogic for drop event: let location = CGEventTapLocation.cghidEventTap let source = CGEventSource.init(stateID: .hidSystemState) let dragAndDropRelease = CGEvent(mouseEventSource: source, mouseType: .leftMouseUp, mouseCursorPosition: locationPoint, mouseButton: .left) dragAndDropRelease?.post(tap: location) I’ve tried changing the order of events, using different event types, and checking the permissions of my app, but none of these solutions have worked. I’m wondering if anyone has encountered a similar issue or has any suggestions on how to resolve this. Any help would be greatly appreciated!
Posted
by XVC_.
Last updated
.