swift 프로젝트 생성 과정에서 맞닥뜨렸던 error들을 정리해보고자 한다.
대부분이 사용환경이 m1이라 생긴 에러들인듯 하다.
m1/arm 일 경우 install 혹은 update할 때 예를 들어 그냥 pod install 말고
arch -x86_64 gem install ffi
arch -x86_64 pod update
arch -x86_64 pod install
이렇게 x86_64 로 지정하여 명령어 썼는지를 잘 확인해보자 !
rbenv global 명령 실행 후에도 ruby 버전이 바뀌지 않는 경우
(rbenv versions 과 ruby --version 의 버전이 다른 경우)
해결 ➸ https://codecamper.me/blog/122/ (ruby 버전 업데이트 방법) 맨아래 챕터 참고!
.zshrc 파일 들어 가기 위해 vim 모드 (vi .zshrc)
(https://blockdmask.tistory.com/25 (vi 명령어))

[!] An error occurred while processing the post-install hook of the Podfile.
undefined methodflutter_additional_ios_build_settings' for #<Pod::Podfile:0x000000010898db78 @defined_in_file=#Pathname:~~/Podfile,`
해결 ➸ error 메세지 잘 읽어보면 undefined method ‘flutter 뭐시기’라고 쓰여있는데 다른 에러들 고치려고 이것저것 terminal에서 해보다가 자동으로 dependency가 다운된듯. podfile 들어가서 flutter 라고 쓰여있는 line 지웠더니 해결됨.
✹ 에러 내용1 : Failed to render and update auto layout status for FSCalendar (iN0-l3-epB): Failed to launch designables agent because the tool was shutting down
✹ 에러 내용2 : Failed to render and update auto layout status for FSCalendar (iN0-l3-epB): Failed to launch designables agent because tool was shutting down. Check the console for a more detailed description and please file a bug report at feedbackassistant.apple.com.
cocoapod uninstall 하고 다시 받는 방법
참고 : https://github.com/CocoaPods/CocoaPods/issues/7606
해당 프로젝트 terminal에서
pod deintegratepod install
Xcode
- delete derived data
- Product -> Clean
- Product -> Clean Build Folder (holding option)
podfile에 입력하고 다시 pod install

# Workaround for Cocoapods issue #7606
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings.delete('CODE_SIGNING_ALLOWED')
config.build_settings.delete('CODE_SIGNING_REQUIRED')
end
end
✹ 에러 내용 : xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select --install # Install Command Line Tools if you haven't already.
sudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools
참고 : https://github.com/nodejs/node-gyp/issues/569
✹ 에러 내용 : can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)**
해결 ➸
sudo gem uninstall cocoapods
sudo gem install -n /usr/local/bin cocoapods
arch -x86_64 pod update
arch -x86_64 pod install
✹ 애러 내용 : no such modules ~
xcode -> scheme -> manage schemes
해결 ➸

하고 clean build folder 하고 종료하고 다시 빌드 . . .
참고 : (https://stackoverflow.com/questions/31065447/no-such-module-when-i-use-cocoapods)
ld: entry point (_main) undefined. for architecture x86_64
해결 ➸ 
@main을 코드에 추가한다.
검색하면 주로 나오는 @UIApplicationMain 은 swift 5.3 이전의 해결방법이다.
이번에 처음으로 swift 공부를 시작하게 되어서 그때그때 상황해결하려고 정리해둔 것들이라 정확한 해결방법인지는 모르겠으나 나는 이렇게 해결했다. ㅜ 세상세상 쌍욕많이 함. m1 .. 돔황챠
이렇게 유용한 정보를 공유해주셔서 감사합니다.