Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pod Spec Lint CoreSimulator detected Xcode.app relocation or CoreSimulatorService version change

Tags:

ios

cocoapods

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?

like image 771
Glenn Posadas Avatar asked Aug 17 '17 08:08

Glenn Posadas


2 Answers

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.

like image 131
Glenn Posadas Avatar answered Nov 01 '22 03:11

Glenn Posadas


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

like image 39
Adriana Pineda Avatar answered Nov 01 '22 05:11

Adriana Pineda