My app was working properly running on my iPhone.
However, it stoped and I'm getting the following main error:
/Users/username/Library/Developer/Xcode/DerivedData/myapp-apyglxnnthiwyufnfwrcifovdhhw/Build/Products/Debug-watchos/myapp WatchKit Extension.appex: errSecInternalComponent
Command CodeSign failed with a nonzero exit code
CodeSign /Users/username/Library/Developer/Xcode/DerivedData/myapp-apyglxnnthiwyufnfwrcifovdhhw/Build/Products/Debug-watchos/myapp\ WatchKit\ Extension.appex (in target 'myapp WatchKit Extension' from project 'myapp')
cd /Users/username/Desktop/myapp
export CODESIGN_ALLOCATE\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "Apple Development: myemail@gmail.com (CODE)"
Provisioning Profile: "iOS Team Provisioning Profile: com.username.myapp.watchkitapp.watchkitextension"
(ANOTHERCODEHERE)
/usr/bin/codesign --force --sign CODEHERE --entitlements /Users/username/Library/Developer/Xcode/DerivedData/myapp-apyglxnnthiwyufnfwrcifovdhhw/Build/Intermediates.noindex/myapp.build/Debug-watchos/myapp\ WatchKit\ Extension.build/myapp\ WatchKit\ Extension.appex.xcent --timestamp\=none /Users/username/Library/Developer/Xcode/DerivedData/matchpoint-apyglxnnthiwyufnfwrcifovdhhw/Build/Products/Debug-watchos/myapp\ WatchKit\ Extension.appex
I have tried turning on and off the laptop, tried to lock and unlocked the login keychain, I also removed the login keychain, I unregistered the device and added it again to Xcode, I removed Xcode and installed it again, I removed my account from Xcode and add it again...
What else can I do?