개발/Swift

Fastfile Gitlab ci 연동 에러 문제 해결방법

덤벨로퍼 2021. 4. 8. 18:38

 

 

1.

Invalid username and password combination

우리가 터미널에서 하듯이 interaction이 불가능 하기때문에

입력해야할 정보들을 미리 넣어줘야한다. 

그중 계정 Password 를 Fastfile 에 넣어줬었는데 이게 잘못 들어갔었다.

ENV["FASTLANE_PASSWORD"] = "계정비밀번호"
ENV["MATCH_PASSWORD"] = "match 비밀번호"

match password 는 match init 할때 지정했을 것이다.

 

2.

 Please enter the 6 digit code:

이중인증을 해줘야하는데

fastlane spaceauth -u 애플계정

을 입력하여 이중인증을 해주면 된다.

해당 작업은 gitlab ci 가 돌아갈 서버 컴퓨터에서 해야한다. 

 

3.

To set the application specific password on a CI machine using
[15:08:09]: an environment variable, you can set the
[15:08:09]: FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD variable

Application-specific passwords

를 알기 위해서 appleid.apple.com/account/manage

들어가서 앱암호를 생성한다. 레이블을 "fastlane" 으로 지정해줬다.

그리고 그 암호를 입력하면 되는데 

ENV["FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"] = "앱암호"

 

 

이렇게 세팅해줬다.

 

4.

failed to load command: pod

before script 에서 pod install 을 하려할때 나는 에러이다.

  - bundle exec pod install

gem을 업데이트 해주고 bundle을 다시 인스톨하였다.

sudo gem update --system
sudo gem install bundler

권한 문제로 gem install 이 되지 않는 다면 rbenv 세팅 해야한다.

참조 : jojoldu.tistory.com/288

 

`find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /Users/luxrobo/builds/PCdPDKXs/0/next-mobile/code_sketch_ios/Gemfile.lock. (Gem::GemNotFoundException)

2.1.4 번들러 버전으로 수정하여 다시시도

gem install bundler -v 2.1.4

역시 되지 않아 스크립트를 그냥 pod install 로 수정 하였더니

작동했다.

 

5.

Installing Realm (10.7.2)
 [!] /bin/bash -c 
 set -e
 sh build.sh cocoapods-setup
 Downloading dependency: 10.5.5 from https://static.realm.io/downloads/core/realm-monorepo-xcframework-v10.5.5.tar.xz
 Undefined symbols for architecture x86_64:
   "___isPlatformVersionAtLeast", referenced from:
       realm::util::(anonymous namespace)::ensure_reclaimer_thread_runs() in librealm-monorepo.a(file_mapper.o)
       realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in librealm-monorepo.a(terminate.o)
       realm::util::network::SecureTransportErrorCategory::message(int) const in librealm-monorepo.a(network_ssl.o)
       realm::util::network::ssl::Stream::verify_peer() in librealm-monorepo.a(network_ssl.o)
       realm::util::Scheduler::make_dispatch(void*) in librealm-monorepo.a(scheduler.o)
 ld: symbol(s) not found for architecture x86_64
 clang: error: linker command failed with exit code 1 (use -v to see invocation)
 [!] Automatically assigning platform `iOS` with version `12.0` on target `Code-Sketch` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

realm 을 설치 하지 못함 xcode 버전이 낮아 업데이트후 다시시도 하였다.