Posts

Post not yet marked as solved
6 Replies
I have tested the app signing the code and result is the same. It does not work. Can someone help me, please? To me it seems quite important bug. API does not work as described
Post not yet marked as solved
6 Replies
That maybe the case since it is test application developed by myself to test behaviour of that. Can I expect odd behaviour even in my local laptop?
Post not yet marked as solved
7 Replies
Hello,I am using that !! in order to convert Boolean type to bool
Post not yet marked as solved
7 Replies
This is the complete example in Obj-C. Just in case you see something:// // main.m // ScreenshotTest // // Created by Raul Sanchez on 24/12/2019. // Copyright © 2019 Raul Sanchez. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreVideo/CVPixelFormatDescription.h> void showPopupIfNotSCreenRecording() { CGDisplayStreamRef stream = CGDisplayStreamCreate(CGMainDisplayID(), 1, 1, kCVPixelFormatType_32BGRA, nil, ^(CGDisplayStreamFrameStatus status, uint64_t displayTime, IOSurfaceRef frameSurface, CGDisplayStreamUpdateRef updateRef) {}); if (stream) CFRelease(stream); } bool checkIfAccessibilityEnabledAndDisplayPopup() { // Method to check if accessibility is enabled // Passing YES to kAXTrustedCheckOptionPrompt forces showing popup NSDictionary *options = @{(__bridge id)kAXTrustedCheckOptionPrompt: @YES}; Boolean accessibilityEnabled = AXIsProcessTrustedWithOptions((CFDictionaryRef)options); return (!!accessibilityEnabled); } int main(int argc, const char * argv[]) { @autoreleasepool { NSLog(@"Lets try this"); showPopupIfNotSCreenRecording(); checkIfAccessibilityEnabledAndDisplayPopup(); NSLog(@"End of program"); } return 0; }
Post not yet marked as solved
7 Replies
Hello,Sorry for the late reply. I Have two functions which are called consecutively. Here is the code:void MacUtils::checkIfScreenRecordingEnabledShowPopupIfNot() { qInfo() << "MacUtils::checkIfScreenRecordingEnabledShowPopupIfNot()"; CGDisplayStreamRef stream = CGDisplayStreamCreate(CGMainDisplayID(), 1, 1, kCVPixelFormatType_32BGRA, nil, ^(CGDisplayStreamFrameStatus status, uint64_t displayTime, IOSurfaceRef frameSurface, CGDisplayStreamUpdateRef updateRef) { Q_UNUSED(status) Q_UNUSED(displayTime) Q_UNUSED(frameSurface) Q_UNUSED(updateRef) }); if (stream) CFRelease(stream); } bool MacUtils::checkIfAccessibilityEnabledAndDisplayPopup() { // Method to check if accessibility is enabled // Passing YES to kAXTrustedCheckOptionPrompt forces showing popup NSDictionary *options = @{(id)kAXTrustedCheckOptionPrompt: @YES}; Boolean accessibilityEnabled = AXIsProcessTrustedWithOptions((CFDictionaryRef)options); return (!!accessibilityEnabled); }First method is for screen recording permission, second one is for accessibilityIf i call first method I see the popup asking for screen recording permissions but then I dont see accesibility popup and if I go to privacy menu it appears like if I had denied permission (app unchecked)Do you have an idea how I can solve this?Thanks in advance
Post not yet marked as solved
3 Replies
Finally modifying the entitlements added when signing fixed this issue
Post not yet marked as solved
7 Replies
No ideas or replies to this??? Is anyone else seeing this ?
Post not yet marked as solved
6 Replies
Here is method implementation:CGEventRef myCGEventCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) { if ((type != kCGEventKeyDown) && (type != kCGEventKeyUp)) return event; qDebug() << "callback called!"; return event; }Any idea why this may happen?Thanks
Post not yet marked as solved
6 Replies
didToggleAccessStatus so far only prints a message. I think problem is related to run loops. Application does not really hang because I added log to print when key event and it gets printed, but laptop stop responding to mouse events. I can move mouse only but clicks don't work.Please could someone explain to me what may happen?Thanks
Post not yet marked as solved
3 Replies
Hello eskimo,Thanks for your answer. My idea is to deploy not via Apple Store but independently, using Developer ID.Why does it matter?Thanks
Post not yet marked as solved
6 Replies
Hello,Unfortunately running command.open /Library/Application Support/com.apple.TCC/TCC.dbReturns:Error: unable to open database "/Library/Application": unable to open database fileSo I think is not possible anymore to manipulate tcc DBI tried also to create bash script to display accessibility panel:#!/bin/bash system("open x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility")But I get:./test.sh: line 3: syntax error near unexpected token `"open x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility"' ./test.sh: line 3: `system("open x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility")'What am I doing wrong?Thanks