Drife Code blogs and ai

React native IOS common errors and solutions

Cover Image for React native IOS common errors and solutions
Front end developer react Js marwin brown
marwinbrown

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:

  1. open Terminal > direct to your project > run:
     pod deintegrate --verbose
  2. 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



More Stories

Cover Image for How I Created a Mobile App Portfolio with AI in Just One Hour

How I Created a Mobile App Portfolio with AI in Just One Hour

Discover how I created a professional mobile app portfolio for a client in just one hour using Vercel's v0 AI. From generating the base code with a simple prompt to customizing it and deploying it on Vercel, this blog details the step-by-step process—highlighting the power of AI in modern web development. And yes, even this blog was crafted with a little help from AI! 🚀

senior developer gautam swami
Gautam swami
Cover Image for Using wireless debugging for Device connection and how to connect android device over wifi for development

Using wireless debugging for Device connection and how to connect android device over wifi for development

Using wireless debugging for Device connection and how to connect android device over wifi for development

senior developer gautam swami
Gautam swami