본문 바로가기

LIFE

[iOS] lottie animation.. M1 때문인가.. 깔기도 힘들다.. (+210802 추가)

새벽에 갑자기 삘받아서 '개발하는 정대리' 님 유튜브 보다가 ...

lottie animation 이라는 애니메이션을 해보려고 영상을 따라하던 도중에

cocoa pod 다운로드 중 pod install 에서 에러가 발생했다.

 

오우노우에러어퀄드

일단 댓글 뒤적거리기.. 

대략 2-3주 전에 나와같은 오류가 발생한 사람들이 있었다.

 

깃허브 들어가서 오류 찾아보기..

https://github.com/CocoaPods/CocoaPods/issues/10311

 

pod install error · Issue #10311 · CocoaPods/CocoaPods

I've read and understood the CONTRIBUTING guidelines and have done my best effort to follow. Report What did you do? ℹ Please replace these two lines with what you did. e.g. Run pod install Wha...

github.com

sudo gem install ffi 

를 쓰라고한다.

다시도전.

 

안된다. 아예 프로젝트를 지우고 새로 도전해보기

(아니 왜 새벽에 간단하게 하고 자려고했는데 졸리기시작했다 .ㅠ.) 

악 안된다.

다시 검색...

 

https://github.com/CocoaPods/CocoaPods/issues/10329

 

Firebase installation error on xcode 12 com m1 processor · Issue #10329 · CocoaPods/CocoaPods

Report What did you do? ℹ i followed the guide on google firebase site to install firebase on xcode but to no avail What did you expect to happen? ℹ I expected the file with .xcworskspace extension...

github.com

 

아 깔렸다 !!!

sudo arch -x86_64 gem install ffi

arch -x86_64 pod install

 

두개 명령어를 폴더에서 실행해주었더니 깔렸다.

m1 맥북이라서 저 명령어를 실행해준것 같다.

(근데 질문 올린 사람은 해결하지 못한 것 같다.. hmmm)

 

 

but 벗 하지만

 

애초에 m1 으로는 지원도 안되는 것이었나..

'개발하는 정대리'님 유튜브에서 소스코드를 다운받아 실행시켜보려고 해도

실행이 되지않는다 ㅇㅅㅇ

 

너무 졸리니 일어나서 다시 도전해봐야겠다.. 

해결방법을 아시는 분을 찾습니다

 

m1 좋긴한데....ㅎ

 


08월 02일 추가!

https://github.com/airbnb/lottie-ios

 

GitHub - airbnb/lottie-ios: An iOS library to natively render After Effects vector animations

An iOS library to natively render After Effects vector animations - GitHub - airbnb/lottie-ios: An iOS library to natively render After Effects vector animations

github.com

pod install 할 때 요 멘트로 추가해주면 된다.

arch -x86_64 pod install --repo-update

 

 

로티 애니메이션 사이트에 들어가서 무료 애니메이션 하나를 골라보아요

https://lottiefiles.com/featured

 

Featured animations from our community

Featured collection of Free Lottie Animations created with Bodymovin.

lottiefiles.com

 

 

우측 상단에 Lottie JSON으로 다운로드 받아줍니다.

 

프로젝트에 json 파일을 추가해줍니다.

 

임포트!!

import Lottie

 

애니메이션 뷰를 파일이름으로 생성해줍니다.

 let animationView = AnimationView(name: "21349-tick-green")

 

간단하게 애니메이션을 실행해봅니다.

view.addSubview(animationView)
animationView.frame = animationView.superview!.bounds
animationView.contentMode = .scaleAspectFit
        
animationView.play()
        
animationView.loopMode = .autoReverse

 

 

성공~~~

 

이제는 됐겠지하고 미루고 미루다 플젝 필요할 때 하게되었다..

'LIFE' 카테고리의 다른 글

해피해킹 프로페셔널 하이브리드 type-s 6개월 사용후기  (0) 2022.03.13
notion 짱 노션 최고  (2) 2021.01.15
[git] 명령어  (3) 2021.01.12
[git] ignore  (0) 2021.01.12
MacBook Pro 구매 개봉, 소감  (2) 2021.01.06