[Xcode 파일 문제해결] git으로 잘못 수정된 파일 되돌리기 / The sandbox is not in sync with the Podfile.lock. 오류 해결 / Build input file cannot be found: 오류 해결

2023. 1. 28. 00:39개발

반응형

git으로 잘못 수정된 파일을 되돌려보자!

The sandbox is not in sync with the Podfile.lock.

앱의 기능을 추가해서 Xcode에서 ios 배포를 하려고 하는데.. 이런 오류가 나왔다.

 

The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

 

처음에는 pod install을 하라고 해서 해주고 다시 들어가서 archive를 눌렀는데..

 

error: Build input file cannot be found: '/Users/ㅇㅇ/ㅇㅇ/GoogleService-Info.plist'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? 

GoogleService-Info.plist을 찾을 수 없다고 나온다. 갑자기!!!

 

그래서 라이언 옆의 폴더 위치를 막 만졌는데..

이런.. 총체적 난국이다!

이런저런 파일들이 모조리 변경 되었다...

 

git reflog

   우선 터미널에 이렇게 입력해서 git 이력을 보고

git reset --hard

  이 명령어를 입력해서 로컬 수정 전으로 되돌아갔다..(다행이다.. git이 없었다면 끔찍했다.)

 

더 이전으로 돌아가고 싶으면 git reset --hard 23f4322 같이 깃 커밋코드?를 입력하면 된다.

 

다행이 파일이 원상복구가 됐다...

 

The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

원상복구를 해서 다시 pod install을 하라고 하는데..

블로그를 찾아보니,

Xcode를 끄고 Pods 폴더에서 Podfile.lock, ProjectName.xcworkspace을 삭제하고 pod install을 하라고 한다.

파일들이 설치된다.

또 안 된다...

pod update도 해준다.

안 된다...

 

 

error: Build input file cannot be found: '/Users/ㅇㅇ/ㅇㅇ/GoogleService-Info.plist'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? 

 

다시 이렇게 오류가 뜨는데..

 

구글링을 하고 해결방법은... 오류있는 파일을 바탕화면에 복사 후 기존 파일을 삭제하고 복사한 파일을 다시 넣어주니 파일의 빨강표시가 사라졌다! 경로문제 같았는데..

참 허무한 해결책이지만 그래도 됐으니 다행이다..

 

 

끝..

반응형