why are after a new react-native project lots of deprecation warnings?
These are known issues in React Native 0.40 (reported in React Native github project as issue #11736) that occur for others (myself as well) on a fresh project.
As of 17 minutes ago, there are a number of pull requests which reduce some of the issues.
One commenter on the issue reports that "Those are warning and you can mostly ignore those warning. You project should run fine with those warning." I've confirmed this, but hopefully we'll get these warnings cleaned up soon.
Why
The OS Deployment target is way too low for many of these dependencies. Some are set to iphone 4!I created a bug in React Native with this same solution
Solution
- Copy function
min_OSTarget_post_install
into your Podfile - Call the function within post_install
- pod install
- See hundreds of Xcode warnings dissapear
Code
def min_OSTarget_post_install(installer) installer.pods_project.targets.each do |target| target.build_configurations.each do |config| if Gem::Version.new('8.0') > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']) config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0' end end endend
post_install do |installer| ... min_OSTarget_post_install(installer) // ADD THIS LINEend