Post not yet marked as solved
We've developed a DriverKit driver to handle our usb mouse products. The driver is working perfectly in macOS 10.15.
In macOS 11 our driver can know our mouse is connecting but somehow, the cursor not moving and button event no response since system started. Unless I re-plug my mouse the cursor and button are working again.
Is this an issue of macOS 11? No matter Intel or Apple silicon this situation happens easily.
Our DriveKit driver is inherited from HIDFamily.
Post not yet marked as solved
Hi everyone,
I am newbie deeply diving in DriverKit.
I need to schedule objects on-by-one, so that I need some methods to manage these.
I tried declare variable like pthread_mutexattr_t*
or pthread_mutex_t
in my .iig files, but never build success.
I also tried include libsystem_pthread.tbd
in Frameworks and libraries, or using
#include <pthread.h>
all never been success.
Is it possible to use pthread in a DriverKit dext? Appreciate for any reply.
Hi there,My macOS application is able to control Powerpoint through AppleScript. The first step of controlling is to see if Microsoft Office installed or not. Here is the worked AppleScript:set appID to "com.microsoft.Powerpoint"
-- check if the application exists
set doesExist to false
try
tell application "Finder" to get application file id appID
set doesExist to true
end try
return doesExistIf the Office is installed, the script returns "true" and "false" vice versa. The script is working under Script Editor and Xcode 8.3.3.However I upgraded my Xcode to 10.3, the script always return "false". This stops me to do notarization. How my object-C call AppleScript API is as below:// AppleScript macro
+ (NSString *)pptIsInstalledOrNot
{
return @"\n\
set appID to \"com.microsoft.Powerpoint\" \n\
-- check if the application exists \n\
set doesExist to false \n\
try \n\
tell application \"Finder\" to get application file id appID \n\
set doesExist to true \n\
end try \n\
\n\
return doesExist \n\
";
}
// AppleScript execution
+ (NSAppleEventDescriptor *)runProcess:(NSString *)script
errorDescription:(NSString **)errorDescription
{
NSDictionary *errorInfo = [[NSDictionary alloc] init];
NSAppleScript *appleScript = [[NSAppleScript alloc] initWithSource:script];
NSAppleEventDescriptor *eventResult = [appleScript executeAndReturnError:&errorInfo];
// Check errorInfo
if (!eventResult) {
// Set error message
if ([errorInfo valueForKey:NSAppleScriptErrorMessage]) {
id message = [errorInfo valueForKey:NSAppleScriptErrorMessage];
if (errorDescription) {
*errorDescription = (NSString *)message;
}
}
}
else {
// Set output to the AppleScript's output
}
return eventResult;
}
// main process
Boolean isInstalled = false;
{
NSString *script = [self pptIsInstalledOrNot];
NSString *errorMessage = nil;
NSAppleEventDescriptor *descriptor = [self runProcess:script errorDescription:&errorMessage];
isInstalled = [descriptor booleanValue];
}I ever tried other ways, still failed. How do I modify my program on XCode 10.3? Appreciate for any ideas andthanks your time.
Hi there,I am trying to notarize my macOS app. My app is embedded with some licensed libraries.I studied document about how to notarize an app and followed steps, my app can be uploaded to Apple notarize services and exported to use, but when I run my app it crashed. Under Xcode it showsdyld: Library not loaded: libMotionEngine-bundle.3.dylib
Referenced from: /Users/kensington/Library/Developer/Xcode/DerivedData/KensingtonWorks-dekfhdrucwmhfogmapgkwzsawyfm/Build/Products/Debug/KensingtonWorks for Ultimate Presenter.app/Contents/MacOS/KensingtonWorks for Ultimate Presenter
Reason: image not foundI've tried several way to run my app successfully including make libraries Required/Optional under Linked Frameworks and Libraries and add my libraries to Embedded Binaries, unfortunately all failed. List conditions and environments below:Xcode version: 10.3 / 11macOS: 10.14.5/10.14.6Libraries signed: NoRuntime Hardened chosen: Allow DYLD Environment Variables & Disable Library ValidationBelow is piece of my library information:Load command 8
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.11
sdk 10.11
Load command 9
cmd LC_SOURCE_VERSION
cmdsize 16
version 0.0
Load command 10
cmd LC_LOAD_DYLIB
cmdsize 56
name libMotionEngine-core.3.dylib (offset 24)
time stamp 2 Thu Jan 1 08:00:02 1970
current version 3.1.4
compatibility version 3.0.0
Load command 11
cmd LC_LOAD_DYLIB
cmdsize 48
name /usr/lib/libc++.1.dylib (offset 24)
time stamp 2 Thu Jan 1 08:00:02 1970
current version 120.1.0
compatibility version 1.0.0
Load command 12
cmd LC_LOAD_DYLIB
cmdsize 56
name /usr/lib/libSystem.B.dylib (offset 24)
time stamp 2 Thu Jan 1 08:00:02 1970
current version 1226.10.1
compatibility version 1.0.0
Load command 13
cmd LC_FUNCTION_STARTS
cmdsize 16
dataoff 54872
datasize 320
Load command 14
cmd LC_DATA_IN_CODE
cmdsize 16
dataoff 55192
datasize 0
Load command 15
cmd LC_CODE_SIGNATURE
cmdsize 16
dataoff 84352
datasize 19696Appreciate any suggestion/opinions!