Brave-ios: Fix iOS 11 deprecation warnings

Created on 17 Oct 2018  路  6Comments  路  Source: brave/brave-ios

There are a few iOS 11 specific deprecation warnings:

  • [ ] 'automaticallyAdjustsScrollViewInsets' was deprecated in iOS 11.0: Use UIScrollView's contentInsetAdjustmentBehavior instead
  • [ ] 'touchIDNotAvailable' was deprecated in iOS 11.0: use LAErrorBiometryNotAvailable
  • [ ] 'touchIDNotEnrolled' was deprecated in iOS 11.0: use LAErrorBiometryNotEnrolled
  • [ ] 'touchIDLockout' was deprecated in iOS 11.0: use LAErrorBiometryLockout
enhancement good first issue

Most helpful comment

All 6 comments

Hi, I would like to work on it if you don't mind.

@klymenkoo all yours! Let us know if you run into any issues!

@kylehickinson @jhreis I've fixed the first one:
'automaticallyAdjustsScrollViewInsets' was deprecated in iOS 11.0: Use UIScrollView's contentInsetAdjustmentBehavior instead

Also, I was a bit confused with 'touchIDNotAvailable', 'touchIDNotEnrolled', and 'touchIDLockout' as there wasn't any particular file specified in the Issue navigator.

I did research about the way to fix these warnings, and it seems that it's actually a bug in Swift compiler (StackOverflow discussion)

I also tried to search for the same issue on GitHub, however, I found that other people also couldn't solve it:

Do you want me to make a Pull Request with solution for
'automaticallyAdjustsScrollViewInsets' was deprecated in iOS 11.0: Use UIScrollView's contentInsetAdjustmentBehavior instead ?

@klymenkoo I think the problem with touchID related warnings is somewhere around here. However, even commenting out the entire method doesn't silence the warning for some reason.

If you want to poke around by all means :) Otherwise, yeah you can make a PR for the fixes for the scroll view insets, Thanks!

@kylehickinson yes, I've been looking exactly at that part of code, but the thing is that it looks right because it uses the LAErrorBiometryNotAvailable, LAErrorBiometryNotEnrolled, and LAErrorBiometryLockout.

According to my research, I tend to believe that it is a Swift compiler bug.

Was this page helpful?
0 / 5 - 0 ratings