React native IOS common errors and solutions



Problem 1 - IPHONEOS_DEPLOYMENT_TARGET set to 11.0
Sol -
The problem is in your pod files deployment target iOS Version not in your project deployment target iOS Version, so you need to change the deployment iOS version for your pods as well to anything higher than 8.0 to do so open your project workspace and do this:
1- Click on pods.
2- Select each project and target and click on build settings.
3- Under Deployment section change the iOS Deployment Target version to anything more than 8.0 (better to try the same project version).
4- Repeat this for every other project in your pods then run the app.
Sol 2 -
Use Xcode to change an iOS project's target target iOS version. XCode > Project Navigator > "General" tab > Deployment Info > Target. You will the "ios/Quevera.xcodeproj/project.pbxproj" file will now have an entry like "IPHONEOS_DEPLOYMENT_TARGET = 11.0;".
Problem 1.1 - ‘value’ is unavailable: introduced in iOS 12.0
FBReactNativeSpec ( React-Codegen )
Sol - Pods > React-Codegn > IPHONEOS_DEPLOYMENT_TARGET > update to 12.4
Problem 2 - struct hash_base : std::__unary_function<T, std::size_t> {};
Sol -Fix from Xcode recommended fix i.e - STD not set in front of_unary_function
Problem 3 - The sandbox is not in sync with the Podfile.lock. Run ‘pod install’ or update your CocoaPods installation
Sol - Just keep the backup of your PodFile and run below commands.
- gem install cocoapods-deintegrate
- gem install cocoapods-clean
- Go to the project directory and run pod deintegrate
- Again run pod clean
- Run pod install
Clean and run.
Method 2:
- open Terminal > direct to your project > run:
pod deintegrate --verbose - pod install --verbose
Problem 4 - main.jsbundle does not exist. this must be a bug with….
Sol - in scripts of package json add
"build:ios": "react-native bundle --entry-file='index.ios.js' --bundle-output='./ios/YourAppName/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'"
Now run - npm run build:ios
Now build again it will work


