rtrouton/rtrouton_scripts

Privileges app help-question

Sudlon opened this issue · 2 comments

Hi rtrouton,

Apologies for raising an issue on this repo, but I didn't how to contact you in any other way. Could you maybe help with a question regarding the Priviliges app you are a contributor of?
Although programming is definitely not new for me, Obj C and compiling that in Xcode is, unfortunately. I was hoping I could get a small change to work relatively quick but apparently this is a bigger turkey to fry than I thought. I was hoping you could look at what I tried (see below) and give me some pointers as to what I should investigate, without me having to study the entire language and the compiling process.

To be clear: this is not an issue of it self, but the only thing I want to achieve is to switch the functionality of the main click on the Tile (i.e. request or remove Admin permissions) and the options click > context menu > "toggle priviliges" (i.e. elevated rights with time limit).

What I tried is:

  1. Add "- (void)togglePrivileges;" to the PrivilegesTile.h
  2. In "AppDelegate.m" do "#import "PrivilegesTile.h"
  3. In "applicationDidFinishLaunching" method call:
    PrivilegesTile *privTile = [[PrivilegesTile alloc] init];
    [privTile togglePrivileges];

But eventhough the IDE is happy, the compiler complains with the following error:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_PrivilegesTile", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Did I take the correct approach? And if so, what could be the issue I'm facing with the compiler? I would be grateful if you could give me any help with this.

Best wishes,
Sudlon

I'm not the developer of the app and I'm not able to offer any support with regards to forking the code. As stated on the Privileges repo: This project is 'as-is' with no support, no changes being made. You are welcome to make changes to improve it but we are not available for questions or support of any kind.

Ok, I understand. Thanks anyway for responding!