wakatime / xcode-wakatime

Xcode plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/xcode
BSD 3-Clause "New" or "Revised" License
393 stars 28 forks source link

Cannot install to Xcode v13.2.1 #57

Closed starcomsys closed 2 years ago

starcomsys commented 2 years ago

I finally upgraded to Xcode 13.2.1 (13C100) and Wakatime will not install to this version. Is there a way to force install the plugin? Or am I just out of luck?

This is a fresh install on a new development system that IS NOT the M1 platform.

alanhamlett commented 2 years ago

I'm also using Xcode Version 13.2.1 (13C100) and the install script worked for me. Sometimes if you're afk while installing it will timeout the sudo password prompt. Can you try running the install script again and look for any error messages?

starcomsys commented 2 years ago

I can understand that occurring however, I am not afk during any installs. I did not see any error messages but I'll try it again.

starcomsys commented 2 years ago

Here is what I get -

password to unlock login.keychain:
Importing self-signed cert to default keychain, select Allow when prompted...
1 certificate imported.
Importing public key to default keychain, select Allow when prompted...
security: SecKeychainItemImport: The specified item already exists in the keychain.
Importing private key to default keychain, select Allow when prompted...
Resigning /Applications/Xcode.app, this may take a while...
/Applications/Xcode.app: replacing existing signature
/Applications/Xcode.app: resource fork, Finder information, or similar detritus not allowed

I'm searching for the cause of this - security: SecKeychainItemImport: The specified item already exists in the keychain.

alanhamlett commented 2 years ago

That one seems like a warning. The error is /Applications/Xcode.app: resource fork, Finder information, or similar detritus not allowed. I'm upgrading my OSX to the latest version to see if I can reproduce it.

starcomsys commented 2 years ago

I am running on macOS Monterey version 12.1 (21C52) - Intel not M1

alanhamlett commented 2 years ago

Tested on MacOS Monterey 12.1 (21C52) also Intel, and didn't get any error:

** BUILD SUCCEEDED **

Cleaning up after installing WakaTime...
Make sure all installed plugins have the latest Xcode compatibility UUID...
password to unlock login.keychain:
Importing self-signed cert to default keychain, select Allow when prompted...
security: SecKeychainItemImport: The specified item already exists in the keychain.
Importing public key to default keychain, select Allow when prompted...
security: SecKeychainItemImport: The specified item already exists in the keychain.
Importing private key to default keychain, select Allow when prompted...
Resigning /Applications/Xcode.app, this may take a while...
/Applications/Xcode.app: replacing existing signature
Finished installing WakaTime. Launching Xcode...

The line it's failing on is (verbose flag added): sudo codesign -f -V -s XcodeSigner2018 /Applications/Xcode.app

Try running that line and paste the output here.

starcomsys commented 2 years ago

Here is what got back -

sudo codesign -f -v -s XcodeSigner2018 /Applications/Xcode.app
/Applications/Xcode.app: replacing existing signature
/Applications/Xcode.app: resource fork, Finder information, or similar detritus not allowed
alanhamlett commented 2 years ago

Try:

xattr -cr /Applications/Xcode.app

Then re-run:

sudo codesign -f -V -s XcodeSigner2018 /Applications/Xcode.app

(Note the capital -V)

starcomsys commented 2 years ago

That workedish - I've been out of coding for awhile and forgot that many things require sudo to run.

For the codesign, I could not use the capital V. I get that it is an invalid option. Using lowercase V worked for me.

I really appreciate your help. I've also cloned your repo in hopes to learn how it works and to see if I can possibly help with the app signing interference with Apple Account.

Thank you again and Happy New Year!