Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make EventKit Imports Explicit #149

Merged
merged 3 commits into from
Feb 23, 2024
Merged

Make EventKit Imports Explicit #149

merged 3 commits into from
Feb 23, 2024

Conversation

forgot
Copy link
Contributor

@forgot forgot commented Jan 22, 2024

Release 1.5.8 (#138) exposes EventKit in all targets through their dependency on the CorePermissionsSwiftUI module. This causes all target libraries to reference EventKit, even if they don't use it.

This PR:

  • Adds a SwiftSetting defining a PERMISSIONSWIFTUI_EVENT flag to the target definitions for JMCalendarPermissionManager and JMRemindersPermissionManager
  • Wraps EventPermissionManager, JMRemindersPermissionManager, and JMCalendarPermissionManager with a compile time check for PERMISSIONSWIFTUI_EVENT
  • Fixes [BUG] - ITMS-90683: Missing purpose string in Info.plist #140

…missionManager and JMCalendarPermissionManager target definitions.
…ndarPermissionManager with PERMISSIONSWIFTUI_EVENT check
@jevonmao
Copy link
Owner

Thanks!

@jevonmao jevonmao merged commit bd4ef03 into jevonmao:main Feb 23, 2024
1 of 3 checks passed
@jevonmao jevonmao added the confirmed bug A bug behavior that has been confirmed by maintainers label Feb 26, 2024
@jevonmao
Copy link
Owner

@forgot Have you tested these changes locally? I didn't check when merging the PR, but now I seem to be getting many Xcode errors from Reminder and Calendar managers when building.

jevonmao added a commit that referenced this pull request Feb 26, 2024
@forgot
Copy link
Contributor Author

forgot commented Feb 26, 2024

Yes, and all tests were passing after the changes. I've even used the fork to deploy to the AppStore with no issues, but I am only using the tracking permission currently.

I used the same method that was used to isolate HealthKit, where a flag is defined in the Swift Package and checked when any modules using EventKit are used.

Are you only getting errors when building, or are the tests failing as well? I'm not at my computer now, but I'll take another look when I get back.

@jevonmao
Copy link
Owner

I was getting errors by building. I'm not familiar with certain behaviors in SPM flags trying to debug, I ended up doing a quick fix by moving the EventPermissionManager into its own target, so all good now.

The problem should be resolved because EventKit is no longer referenced in CorePermissionsSwiftUI. Let me know I missed anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed bug A bug behavior that has been confirmed by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - ITMS-90683: Missing purpose string in Info.plist
2 participants