develop/Flutter

Framework 'flutter_inappwebview' not found 6.0.0 버전

방뎁 2024. 5. 14. 10:00
반응형

우선 Framework 'flutter_inappwebview' not found오류가 계속 떴다. 

5.x.x 버전에서 6.0.0으로 올리니깐 안드로이드는 빌드되지만 iOS가 안되네? 헣ㅎ허

weburl 때문에 무조건 6.0을 써야하는 상황인데 다시 다운그레이드를 할 수도 없는 상태에서 

무조건 방법을 찾아야했다. 

이번에 소요된 시간 무료 12시간,,, 

이 글이 도움이 되기를 

 

먼저 발생한 에러는 아래와 같다. 

Launching lib/main.dart on iPhone 13 in debug mode...
Running Xcode build...                                                  
 └─Compiling, linking and signing...                        705ms
Xcode build done.                                           16.9s
Failed to build iOS app
Error (Xcode): Framework 'flutter_inappwebview' not found


Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

에러 이미지

 

결국에는 not found~~

이전 4.x~ 버전부터 계속 문제가 있었던것 같다. 

clean, pod install --repo-update 등등

pods를 지우기를 수십번

다 안된다. 

https://github.com/pichillilorenzo/flutter_inappwebview/issues/458

 

Module 'flutter_inappwebview' not found Xcode · Issue #458 · pichillilorenzo/flutter_inappwebview

When I try to build the app it comes up with the error message: "Module 'flutter_inappwebview' not found". Can't find where this is coming from because me PodsFile says it install was installed. I ...

github.com

이슈를 참고하여 podfile도 수정했다. 

 

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          unless file.settings.nil? || !file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

but 안되죠~

 

그러면서 삽질하던 중 스택오버플러우에서 하나를 발견했다,

https://stackoverflow.com/questions/70123985/framework-not-found-in-webview-flutter-when-making-build-in-ios

 

framework not found in webview_flutter when making build in IOS

I used the webview_flutter package to show some pages in webview in a flutter, In android, it's working fine but when I try to run in IOS I get an error as in the screenshot. Can anyone help, I rea...

stackoverflow.com

 

 

podfile에 넣은 내용이 이내용일텐데 왜 안될까,, 싶기 했지만 

수정한다...

이거 수정하면 나중에 조질거 같지만

조지면 다시 원복해야 하니깐 블로그 쓴다... 

xocde 이미지xocde 이미지

target > other linker flages > 'flutter_inappwebview' -> 'flutter_inappwebview_ios' 변경

 

pod install 할때 flutter_inappwebview가 아닌 flutter_inappwebview_ios로 pod가 받아졌다. 

그래서 업데이트 된 내용이겠거니 했는데 

반영이 안된건지 뭔지 하여튼 계속 못 찾는다고 해서,, 왓,, 싶었다고요?

아니 설마???? 하는 심정으로 flutter_inappwebview_ios 수정하고 나니 

디버그 빌드도 릴리즈 빌드도 된다. 

 

iOS 개발만 하고 싶다. 다시 iOS로 돌아가고 싶,,

 

이때 까지 사용한 명령어 

2024.05.13 - [develop/Flutter] - 매일 사용하는 flutter 명령어

 

매일 사용하는 flutter 명령어

flutter doctorflutter pub getflutter cleanflutter upgrageflutter runflutter pub cache repair iospod installpod deintegratepod cache clean -allpod cache listpod updaterm Podfile.lockrm Podsaosflutter build apk -debugflutter build appbundle이미 뜻을 알

devfart.tistory.com

 

반응형