작성
·
50
0
선생님 수강을 하면서 활용하며 혼자 사이드 프로젝트를 진행하고 있습니다!!
아래와 같이 현재 이렇게 쓰고 있습니다! ios빌드시 발생하고 있습니다ㅠ! 아무리 해봐도 해결이 안됩니다.. 맵 라이브러리가 최신꺼는 fabric 지원을 한다 해서 저는 fabric을 끄고 수강하려 합니다.! 그래서 1.21.0 으로 버전도 낮췄지만 자꾸 저 오류가 발생합니다..
"react-native": "^0.79.2", "react-native-maps": "1.21.0",
podfile 입니다!
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')
platform :ios, '15.1'
prepare_react_native_project!
setup_permissions([
'Camera',
'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse',
'Microphone',
'Notifications',
])
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => :static
end
target 'Frontend' do
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-maps', :path => rn_maps_path, :modular_headers => true
pod 'react-native-google-maps', :path => rn_maps_path
pod 'react-native-maps-generated', :path => rn_maps_path
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => true,
:fabric_enabled => false, # Fabric 끄기
:new_arch_enabled => false,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
end
end
답변 2
1
0
안녕하세요, 인프런 AI 인턴입니다. 유다현님.
iOS 빌드시 발생하는 RNMapsMarkerView
관련 오류는 라이브러리의 설정과 관련된 문제일 가능성이 큽니다. react-native-maps
에 대한 해당 오류를 해결하기 위해 몇 가지 방법을 시도해 볼 수 있습니다.
react-native
의 Fabric 모드는 새로운 아키텍처로 반영되고 있습니다. 최신 라이브러리가 이를 지원하지 못할 때 비활성화하는 것이 올바른 접근입니다. Podfile에서 다음과 같이 Fabric을 비활성화한 것이 맞지만, 다른 설정이 필요할 수도 있습니다.:fabric_enabled => false,
react-native-maps
설정:
:path => rn_maps_path
설정이 의심될 수 있습니다. 기본적으로 react-native-maps
와 react-native-google-maps
는 각각의 경로에 대해 설정이 되어 있다면, 정확한 설정을 확인하고, 혹시 잘못된 경로가 설정되어 있다면 수정해 주십시오.Xcode 캐시 정리:
RNMapsMarkerView
에 관련된 오류를 정리하기 위해, 다음과 같은 명령어로 DerivedData를 삭제하세요.rm -rf ~/Library/Developer/Xcode/DerivedData && xcodebuild clean
재설치 및 클린 빌드:
rm -rf node_modules
rm -rf ios/Pods
rm -rf ios/Podfile.lock
yarn install
cd ios
pod install
아래 링크들을 확인하여 비슷한 경우의 솔루션을 참고하시는 것도 도움이 될 것입니다:
제가 제공한 해결책 중에서, 특정 방법이 유다현님의 문제를 해결하는 데 도움이 되기를 바랍니다.
저는 질문자님의 이해를 돕고자 지식공유자님의 기존 답변을 참고하여 유사한 답변 링크를 추천해드리고 있습니다. 현재 베타 기능으로 답변이 만족스럽지 않을 수 있는 점 양해 부탁드립니다. 🙏 추가적으로 궁금한 점이 있으시면, 이어서 질문해 주세요. 곧 지식공유자께서 답변해 주실 것입니다.
해결되어 다행입니다! 공유해주셔서 감사합니다.