0

Every time I try to build my XCode project on my device I am met with build failure.

I have tried solutions on Build on device fails with exit code 1

These are last two lines of the error log

libswiftCoreLocation.dylib: errSecInternalComponent

error: Failed with exit code 1
DSmith
  • 159
  • 1
  • 1
  • 13
  • Can you build _any_ Xcode project on a device? What if you try it with a plain "vanilla" Single View app template project right out of the box? – matt Apr 16 '19 at 18:11
  • I tried building an out of the box Single View app and this fails as well with the same error code. – DSmith Apr 16 '19 at 19:57
  • Ok so if you have a paid developer membership the problem is in your keychain certificates as has already been suggested. The WWDR cert is a particularly insidious possibility. All you can really do is delete everything Apple related from the keychain and start over. – matt Apr 16 '19 at 20:08

1 Answers1

1

I have seen this error before when trying to code sign. If your build succeeds when you set the destination to a simulator, then you probably have a problem with your code signing keychain.

If that is the case, try signing out and signing back in to your developer profile through Xcode and also make sure that your project has the correct signing settings and that your team is set to what you are expecting.

rpecka
  • 1,168
  • 5
  • 17
  • I figured it was something with the keychain, but I haven't found too many debugs for that. – DSmith Apr 16 '19 at 19:59
  • So were you able to build for the simulator? – rpecka Apr 16 '19 at 20:06
  • Yes, all simulations builds are running fine. – DSmith Apr 16 '19 at 20:07
  • Ok. Let us know if the two tips I suggested in my updated answer work. If not, you could also try opening your keychain and making sure you grant whichever program ran into that error permission to use your dev keychain. – rpecka Apr 16 '19 at 20:34
  • There was an update somewhere I had overlooked, after that I signed out and back in and this solved it. Sorry for the wasted time – DSmith Apr 16 '19 at 21:22