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

tvOS support #149

Closed RomanPodymov closed 4 years ago

RomanPodymov commented 4 years ago

Hello. Thank you for SPPermissions. In this pull request I added support for tvOS. Some permissions are not supported for tvOS, that's why I made them available for iOS only with #if os(iOS). Tested it with CocoaPods. Fixed SPPermissions.dialog example in README.

ivanvorobei commented 4 years ago

Wow! Thanks for your work!

I have not encountered development for TV, I hope you can help. Could you add a new target - example for tv in project?

RomanPodymov commented 4 years ago

Wow! Thanks for your work!

I have not encountered development for TV, I hope you can help. Could you add a new target - example for tv in project?

Done. However I see some bugs in the example for tvOS. Would you please create a branch for tvOS support?

ivanvorobei commented 4 years ago

Why need new branch? Why you can't add to this branch? I don’t find fault, I just don’t understand what you want to do.

ivanvorobei commented 4 years ago

I think need remove for Apple TV List & Dialog controllers. Also I am try call with Native any permission - it not work (maybe need request permission only on real device?)

RomanPodymov commented 4 years ago

Hello @ivanvorobei OK, I will fix all tvOS-related issues in the master branch. Permissions are also supported by tvOS simulator, I will check why Native is not displaying in the tvOS example.

RomanPodymov commented 4 years ago

@ivanvorobei Left SPPermissionsDialogController and SPPermissionsListController for iOS only. Fixed the issue with tvOS example.

ivanvorobei commented 4 years ago

@RomanPodymov for me in tv simulator permission not requested. Maybe I do some this wrong? Simple run and tap play for request permission.

RomanPodymov commented 4 years ago

@ivanvorobei Fixed, check it please.

ivanvorobei commented 4 years ago

For now all ok! Thanks) Let me 1-3 hours for check all changes and after it I am merge and publish new version for CocoaPods.

ivanvorobei commented 4 years ago

I am publish new version 5.1. @RomanPodymov many thanks for your work and time!

If anybody can help, I am add new item in Cooperation section about icon for example target.