rtrouton / rtrouton_scripts

Scripts to share
MIT License
1.3k stars 489 forks source link

Privileges app help-question #72

Closed Sudlon closed 3 years ago

Sudlon commented 3 years ago

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

rtrouton commented 3 years ago

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.

Sudlon commented 3 years ago

Ok, I understand. Thanks anyway for responding!