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

macOS support #471

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from
Draft

macOS support #471

wants to merge 12 commits into from

Conversation

IVLIVS-III
Copy link
Contributor

This PR adds macOS as a supported platform.

Closes #409.

As discussed on #466 we want to have a unified codebase for both iOS and macOS.
In this PR is heavily based on #466 but makes the changes necessary for a shared swift source.

The example app runs now both on iOS and macOS, with full feature support on both platforms.

@IVLIVS-III
Copy link
Contributor Author

@thomassth Do you mind looking at this if you have some spare time?

Should this be a 4.4.0 release or bundled in the big 5.0?

@thomassth
Copy link
Contributor

I wasn't able to get any calendar details when running example app in MacOS

@IVLIVS-III
Copy link
Contributor Author

IVLIVS-III commented Feb 15, 2023

I wasn't able to get any calendar details when running example app in MacOS

What do you mean by calendar details? Events in that calendar, calendar name, calendar color, readonly/read/write state of the calendar, or something different?

Edit: Did you make sure, that calendar access was enabled in AppSandbox in the example app (macOS) in XCode?

@thomassth
Copy link
Contributor

What do you mean by calendar details? Events in that calendar, calendar name, calendar color, readonly/read/write state of the calendar, or something different?

Edit: Did you make sure, that calendar access was enabled in AppSandbox in the example app (macOS) in XCode?

The example app isn't showing any calendar at all (the first page), and there was no details for me to click into

And the calendar access was on, but I've not seen any permission popup when the app opens (usual behavior on Android)

fyi I'm testing on M1 air, but I thought that should only increase compatibility with iOS code, not causing more problems :(

@IVLIVS-III
Copy link
Contributor Author

The example app isn't showing any calendar at all (the first page), and there was no details for me to click into

hmm, interesting… it worked on my machine :(
even being able to create new events, that then showed up in the native Apple calendar app and edit events created by the native calendar app.

fyi I'm testing on M1 air, but I thought that should only increase compatibility with iOS code, not causing more problems :(

I tested on an Intel MacBook Pro running macOS Ventura (macOS 13)

@thomassth
Copy link
Contributor

I guess in this state we can slap a beta/Intel only label and ship it

@IVLIVS-III
Copy link
Contributor Author

I guess in this state we can slap a beta/Intel only label and ship it

Attached a screen recording of how it looks on my machine…

Bildschirmaufnahme.2023-02-17.um.21.46.08.mov

thomassth
thomassth previously approved these changes Feb 17, 2023
@kingvhit
Copy link

I think the reason that @thomassth doesn't see any popup request calendar permission in his side caused by bug on Xcode.

Just try my ideas

  • Don't open/run macOS App from Android Studio/Visual Studio Code
  • Using Xcode instead and run example directly.

This fixes a regression and closes #474 .
@gaetschwartz
Copy link

Experienced the same issue as well, not sure if it's XCode's fault or something else ? flutter/flutter#122796

@brandonguigo
Copy link

brandonguigo commented Mar 18, 2024

Hey @IVLIVS-III @thomassth,

I would like to use device_calendar on macOS, including Apple Silicon.
Any hope to revive this PR ? :)

@IVLIVS-III IVLIVS-III marked this pull request as draft March 18, 2024 11:21
@IVLIVS-III
Copy link
Contributor Author

@brandonguigo I created this PR some time ago. At this point in time, multiple conflicts with the base have emerged and I have no capacity to update this right now. That‘s why I marked it as draft. This PR is not in a review-ready state right now.
Feel free to fork the feat/macos-support branch of my fork and continue this PR if you like.

@lukemmtt
Copy link

lukemmtt commented May 1, 2024

Regarding the bug discussed here earlier (i.e. permissions not working right for macOS builds launched from VSCode or Android Studio), I've gathered some likely-relevant discussions for reference:

For what it's worth, my workflow for debugging anything involving Calendar or Reminders macOS permissions right now is:

  1. Launch debug or release build from Android Studio. Permissions will not work at this stage, and any attempt to read permission will return PermissionStatus at the OS level.
  2. Ensure the launcher icon is saved in the dock, then close the app & reopen it by clicking on icon in dock
  3. Permissions work as expected.

Additionally, I haven't filed a PR or even reviewed his code much, but my colleague recently created his own macOS-support fork of device_calendar here for our purposes. Sharing for reference.

@lukemmtt lukemmtt mentioned this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mac OS support
6 participants