sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

SPPermissionsListHeaderView class is missing layoutMarginsGuide.bottomAnchor #231

Closed alzin closed 3 years ago

alzin commented 3 years ago

I just have tried the libraries and I was able to install it via CocoaPods but when I compile once after I opened the Xcode workspace again I got an error in the SPPermissionsListHeaderView because bottomAnchor misses the layoutMarginsGuide, so once I edited that the I built the program successfully!

let bottomAnchor = titleLabel.bottomAnchor.constraint(equalTo: layoutMarginsGuide.bottomAnchor, constant: -25)
        bottomAnchor.priority = .init(900)
        bottomAnchor.isActive = true
ivanvorobei commented 3 years ago

Can you provide error which you got? It should work without layoutMarginsGuide.

alzin commented 3 years ago

@ivanvorobei

After inserting these lines in Podfile and install them,

pod 'SPPermissions/Bluetooth' pod 'SPPermissions/LocationWhenInUse' pod 'SPPermissions/LocationAlways'

I built the project and get the following error as the screenshot shows!

Screen Shot 2021-05-18 at 4 32 47 PM

To solve it just added layoutMarginsGuide like this!

Screen Shot 2021-05-18 at 4 39 29 PM
ivanvorobei commented 3 years ago

Its look strange. In this case no need attach to layout margins. I release new version in 5 minutes.

ivanvorobei commented 3 years ago

Thanks for full info.

ivanvorobei commented 3 years ago

Released 6.0.5 version, please, update.