답변
노드 모듈을 삭제 한 다음 실행 npm install
(또는 더 좋은 방법은 yarn)하고 모든 다운로드가 완료된 후 실행 react-native upgrade
하면 이전 파일을 템플릿 파일로 대체 할 수있는 옵션이 제공됩니다. 이렇게하면 네이티브 종속성을 react-native에서 다시 연결합니다. 문제를 해결해야합니다. 물론 Xcode에서 프로젝트를 정리하는 것을 잊지 마십시오.
답변
xcode Product-> Scheme-> Manage Schemes Target에서 ‘+’를 클릭하여 “React”를 선택하고 React가 공유되도록 설정합니다.
답변
React Native 0.40.0 이상을 사용하는 모든 경우 헤더 가져 오기가 RN 0.40.0 에서 크게 변경 되어 많은 .h 파일을 찾을 수 없음 오류가 발생합니다. react-native-git-upgrade
디버그 중에 문제를 해결했지만 릴리스 / 아카이브에서 빌드가 실패했습니다.
cocoapods 및 Xcode 8.2.1 과 함께 RN 0.42.3 을 사용 하고 있습니다.
이 문제를 완전히 해결하려면 Xcode> Product> Scheme> Edit Scheme>으로 이동하십시오.
이제 프로젝트를 정리하고 빌드하십시오.
답변
다른 제안 중 어느 것도 내 오류를 수정하지 않았지만 이것은 해냈습니다.
1-Podfile 생성
ios/Podfile
다음 콘텐츠로 반응 네이티브 앱 내부에 이름이 지정된 파일을 만듭니다 .
# You Podfile should look similar to this file. React Native currently does not support use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target '<YOUR_APP_NAME>' do
# Fixes required for pod specs to work with rn 0.42
react_native_path = "../node_modules/react-native"
pod "Yoga", :path => "#{react_native_path}/ReactCommon/yoga"
pod "React", :path => react_native_path, :subspecs => [
'Core',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]
pod 'GoogleMaps' # <~~ remove this line if you do not want to support GoogleMaps on iOS
# when not using frameworks we can do this instead of including the source files in our project (1/4):
# pod 'react-native-maps', path: '../../'
# pod 'react-native-google-maps', path: '../../' # <~~ if you need GoogleMaps support on iOS
end
2-Podfile 설치
pod install
ios 폴더 내 에서 명령 을 실행하십시오 .
3-XCode 재설정
XCode를 다시 시작하면 오류가 사라집니다.
답변
XCode에서 React 빌드를 처음 실행 한 후이 문제가 발생했으며 실제로 빌드하고 실행하여 오류를 없애기 위해 (팀을 선택하고 적절한 프로비저닝 후)해야했습니다. 때때로 XCode는 처음으로 컴파일하고 링크 할 때까지 실제로 오류가 아닌 오류를 표시합니다.
답변
나를 위해 일하는 해결책은 React
계획 을 공유 하는 것입니다.
React 체계가 없으면으로 새로 Selecting scheme menu -> Manage Scheme -> + -> choose React
만든 다음 React 체계를 공유로 표시하십시오.
또한 Xcode 10을 사용하는 경우 File -> Project Settings
Legacy 빌드 시스템으로 이동하여 선택하십시오.
