jevonmao / PermissionsSwiftUI

A SwiftUI package to beautifully display and handle permissions.
https://jevonmao.github.io/PermissionsSwiftUI/
MIT License
1.44k stars 81 forks source link

[BUG] - JMNotificationPermissionManager does not work with iOS 15 #97

Open cipolleschi opened 3 years ago

cipolleschi commented 3 years ago

Describe the bug I was building my project with iOS 15 and the library won't build. Starting from iOS 15, UIApplication.shared.registerForRemoteNotifications() cannot be used in extensions anymore and the error suggests to use a ViewController implementation instead.

To Reproduce Steps to reproduce the behavior:

  1. Install Xcode 13
  2. Build the project
  3. Observe the build process fail

Expected behavior The framework should build

Smartphone (please complete the following information):

jevonmao commented 3 years ago

@cipolleschi I will get this fixed ASAP.

jevonmao commented 3 years ago

Follow up, I have attempted to reproduce this bug on Xcode 13, standard SwiftUI project for iOS, targeting iOS 15 and building for iOS 15 simulator. And I am not able to reproduce the error you are talking about. @cipolleschi

cipolleschi commented 3 years ago

Thanks for being that prompt. We are seeing the error in a project with a WatchOS app associated. I'll try to create a sample project and to attach it here as reference!

cipolleschi commented 3 years ago

Hey, this is the example project with the error. Is an Empty WatchOS + iOS project in which I just added the PermissionSwiftUI Swift Package.

Let me know if I can help in any way! TestPermissionPackage.zip

jevonmao commented 3 years ago

A little bit busy for the past week, I will try to get to this today.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jevonmao commented 1 year ago

Will verify all WatchOS(also possibly other less attended to platforms like tvOS) PermissionsSwiftUI APIs, against newest iOS 17