Reputation: 193
I installed react-native-maps and started getting the following warnings:
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'Flipper' from project 'Pods') warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'Google-Maps-iOS-Utils' from project 'Pods') warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'react-native-google-maps' from project 'Pods')
I saw some online suggestions like the one below:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
end
end
end
However, my podfile looks like the following (this was how it looked when I installed react-native)
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'allocentric' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
# React Native Maps dependencies
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
target 'allocentricTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'allocentric-tvOS' do
# Pods for allocentric-tvOS
target 'allocentric-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
I can't seem to run the solutions posted online before "post_install" already exists, I have already tried to remove the first post_install or putting the above solution in that post_install but neither works.
Upvotes: 3
Views: 4295
Reputation: 666
Comment the below lines
add_flipper_pods!
post_install do |installer|
flipper_post_install(installer)
end
Also add the following lines at the end of Pod file
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
end
Upvotes: 1
Reputation: 6967
Try this adding in pod file
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Ref: Range-of-supported
Upvotes: 4