안녕하세요 블로그 주인장 후니입니다.
오랜만에 포스팅을 합니다.
사실 어제부터 계속 Flutter에서 ios 로 빌드를 할때 모듈을 못 찾거나 안되는 현상으로 해서 죄없는 Xcode 는 5번정도 재설치를 했구요.
해결한 방법에 대한 것을 잊지않게 정리해봅니다.
위의 이미지를 보시면 아시겠지만 AppDelegate.swift 에 Flutter 를 import 를 했지만 인식을 하지 못하는 오류
Xcode DerivedData 폴더에 없다는 이상한 오류
사실 Xcode 를 업데이트를 하기 전에는 이런 오류는 나지 않고 정상적으로 빌드가 되고 했었는데 안 되더라구요.
여기서 부터 멘붕이 되더라구요.
chat 선생한테 물어봐도 DerivedData 폴더를 삭제하라는 말뿐이더라구요.
일단 제가 검색하고 해결한 방법 알려드릴께요
Xcode Setting 에 들어가보시면 아래 이미지와 같은 탭이 있습니다.
거기에서 Locations를 선택하시고 DerivedData2로 변경을 합니다.
다시 Xcode 를 종료하시고 Intellij 로 돌아가셔서 pod install --repo-update 를 하신후에 다시 Xcode에서 빌드를 해보시면 정상적으로 빌드가 되는것을 확인하실 수 있습니다.
P.S : 아참 제가 또 하나 깜빡한거 Podfile 에 변경적용한 것도 첨부해드립니다.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
end
end
end
[Flutter] Drawer 아이콘 색상 변경하기 (0) | 2024.08.19 |
---|---|
[Flutter] Unknown feature SUPRESS_ERROR_PAGE Error (0) | 2024.08.12 |
Flutter 3.22.0-5.0.pre.29 bug (0) | 2024.06.14 |
[Flutter] Container Radius 넣는 방법 (0) | 2024.04.02 |
[Flutter] Flutter Local Notification 활용기 (Android HTML Format notification) (0) | 2024.02.07 |