React Native iOS on MacBook M1
March 11, 2021
Grundsetup
- Xcode oeffnen und das
.xcworkspacenutzen Product > Clean Build Folderbei Build Fehlern
Troubleshooting
Deployment Target zu niedrig
Warnungen wie:
code
IPHONEOS_DEPLOYMENT_TARGET is set to 8.4 ...
Fix im Podfile:
code
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
Flipper Fehler
Wenn event-config.h fehlt oder Flipper Pods nicht gefunden werden:
code
pod repo update
pod install --repo-update
Optional: Flipper Version im Podfile aktualisieren.
Undefined symbol (Swift)
code
Undefined symbol: protocol descriptor for Swift.ExpressibleByFloatLiteral
Workaround: Xcode via Rosetta starten oder Pods mit arch -x86_64 installieren.
main.jsbundle fehlt
code
react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios
Tipp
Bei iOS Build Problemen: immer in Xcode bauen, nicht nur ueber CLI. Fehlermeldungen sind viel klarer.