I think it basically comes down to this function that needs to be wrapped:
However, this needs to be linked against the security framework, and I don´t know how to explain this to the BlitzMax compiler. In Xcode, they just "add" the core frameworks and it compiles. How would you do that in Max?
#include <assert.h> #include <Carbon/Carbon.h> #include <Security/Security.h> extern OSStatus AcquireRight(const char *rightName) // This routine calls Authorization Services to acquire // the specified right. { OSStatus err; static const AuthorizationFlags kFlags = kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights; AuthorizationItem kActionRight = { rightName, 0, 0, 0 }; AuthorizationRights kRights = { 1, &kActionRight }; // assert(gAuthorization != NULL); // Request the application-specific right. err = AuthorizationCopyRights( gAuthorization, // authorization &kRights, // rights NULL, // environment kFlags, // flags NULL // authorizedRights ); return err; }
However, this needs to be linked against the security framework, and I don´t know how to explain this to the BlitzMax compiler. In Xcode, they just "add" the core frameworks and it compiles. How would you do that in Max?