6

The command pod spec lint fails. I couldn't find a similar question here on SO and on Cocoapod's repo. Full log:

-> GPKit (0.1.1) - ERROR | [iOS] unknown: Encountered an unknown error (757: unexpected token at '2017-08-17 16:12:08.932 simctl[55281:678990] CoreSimulator detected Xcode.app relocation or CoreSimulatorService version change. Framework path (/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (375.21) does not match existing job path (/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc) and version (459.13). Attempting to remove the stale service in order to add the expected version. ') during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

Any solution for this? And why it happens?

Glenn Posadas
  • 12,555
  • 6
  • 54
  • 95

2 Answers2

26

For reference, I've managed to solve this problem. I found the answer here: https://stackoverflow.com/a/40258881/3231194

Though the question is about CI.

In short, the solution I got was from Luca, run this:

launchctl remove com.apple.CoreSimulator.CoreSimulatorService || true

As for the explanation what caused the problem, I think it's because I have and run two versions of Xcode. 8.3 and 9.0.

Glenn Posadas
  • 12,555
  • 6
  • 54
  • 95
3

I run into this issue and solved it by changing the Command Line Tools in Xcode (Xcode > Preferences > Locations) as explained here: https://stackoverflow.com/a/41536029/4196117

Bottom line, I was using a different Xcode version for the command line tools than the one I was actively using for my project.

Update: image for reference enter image description here

Adriana Pineda
  • 9,219
  • 1
  • 12
  • 14
  • Thank you! I'm running multiple versions of XCode to support different applications and this fixes my fastlane lane. In my lane, I call git_commit, push_to_git_remote, add_git_tag, push_to_git_remote, and pod_push. The solution here with 'launchctl remove' didn't help fix my issue. – Nick N Jul 16 '18 at 15:23
  • @NickN I think you are referring to the other response, have you tried this workaround: https://stackoverflow.com/a/41536029/4196117? – Adriana Pineda Jul 18 '18 at 06:33