react-native-braintree-dropin-ui
react-native-braintree-dropin-ui copied to clipboard
Error being thrown instead of a warning for bottomLayoutGuide being deprecated
I'm using Xcode 12.2 and when I build I'm getting an error that says 'bottomLayoutGuide' is deprecated: first deprecated in iOS 11.0
(similar message for 'topLayoutGuide')
There are three instances of this error that all happen in the BTDropInController.m
file:
- safeAreaHeight
- topLayoutAnchor
- bottomLayoutAnchor
Each of these instances all have a check for iOS 11 if (@available(iOS 11.0, *))
and my Deployment Target is set to iOS 11.0 so I can't figure out why I'm getting an error instead of just a warning since the code checks for iOS 11.0 or greater .
I've tried setting my Deployment Target to iOS 12.0 to see of that helps but there is no change.
Hi @smcgee31, Did you manage to find a fix for this?
I finally just had to remove the if - else
statement in each of those locations in the BTDropInController.m
file simply returning what is returned if iOS 11.0 were to be found. I should have filed an issue with Braintree but got busy, as usual, and didn't. :(
You can resolve this by adding a post-install step in your Podfile where you disable deprecation warnings
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS'] = 'NO'
end
end