에러상황
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`,
which does not define modules. To opt into those targets generating module maps
(which is necessary to import them from Swift when building as static libraries),
you may set `use_modular_headers!` globally in your Podfile,
or specify `:modular_headers => true` for particular dependencies.
새프로젝트에서 위 같은 에러가 발생했다.
use_frameworks를 주석처리하니
dyld: Library not loaded
...
이와 같은 실행 오류가 발생했다.
많은 시행착오를 걸쳐 발견한 해결법은 아래와 같다
해결책
0) react-native version
version >= 0.70 인 경우 < 0.7 로 변경 (ex 0.65)
1) 맥 os 기분, 아래 경로에서 프로젝트 폴더 제거
/Library/Developer/Xcode/DerivedData
2) Podfile 확인/수정
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
use_frameworks! :linkage => :static
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
target 'myapp' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'myappTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# use_flipper!()
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
3) pod 갱신
Podfile.lock 제거
Pods 폴더 제거
pod install
4) 실행 및 확인
npm run ios
'개발, 코딩 > App - React Native' 카테고리의 다른 글
react-native, pod install - The following Swift pods cannot yet be integrated as static libraries (0) | 2022.09.05 |
---|---|
channel.io ios 빌드에러 [react-native-channel-plugin] (1) | 2022.07.22 |
ReactNative - 쉽고 간단하게 애니메이션 뷰 구현 (0) | 2022.05.24 |
[solved] react-native-video, android error (0) | 2022.05.18 |
[solved] Android Gradle plugin requires Java 11 to run (0) | 2022.05.18 |