Flutter

[Flutter] iOS 구동시 발생하는 Pods-Runner 에러

teveloper 2024. 1. 6. 17:23
반응형

 

 

Flutter로 개발중 iOS 시뮬레이터로 실행하였는데 다음과 같은 에러가 발생하였다. 

 

[!] Automatically assigning platform `iOS` with version `11.0` on target `Runner` because no platform was specified. Please specify a platform for this target
in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

 

대략 Runner의 플랫폼 버전을 명시하라는 뜻인것 같다. 해당 에러를 수정하기 위해서는 podfile 수정이 필요하다.

 

Podfile 수정하기

 

ios/Podfile로 들어가 상단에 주석처리된 코드를 주석 해제 처리하자.

 

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'

 

해당 코드를 주석해제 후 Flutter를 재가동했는데 이번에는 다음과 같은 에러가 발생했다.

 

Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
[!] Unable to find a target named `RunnerTests` in project `Runner.xcodeproj`, did find `Runner`.

 

RunnerTests 관련 에러인듯 싶은데 이번에도 podfile 수정이 필요하다. 아래 코드를 주석처리하자.

 

  # target 'RunnerTests' do
  #   inherit! :search_paths
  # end

 

해당 코드를 주석처리한 후 Flutter를 재가동하니 iOS 시뮬레이터에서 정상적으로 실행한다. Flutter 한번 띄우는것도 쉽지 않군.

 

 

반응형