Skip to content
New issue

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

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

Already on GitHub? # to your account

[Feature] Add macos support #16

Open
dkbast opened this issue Nov 26, 2023 · 6 comments
Open

[Feature] Add macos support #16

dkbast opened this issue Nov 26, 2023 · 6 comments

Comments

@dkbast
Copy link

dkbast commented Nov 26, 2023

From my understanding, contacts is available on mac (and various other apple OSes) - I believe it would be great if we could also support macos - I suspect that this should be possible using the shared implementations "darwin" flag, that would require a minimum version of Flutter 3.7, so might be a "major" version increment for fast_contacts, or copy pasting the code into macos? I tried getting darwin to work, but the mix of "todays" Flutter and the ios implementation was too much for a quick 15 minute tinkering session.

If you can point me in the right direction I would love to assist :)

https://developer.apple.com/documentation/contacts

@s0nerik
Copy link
Owner

s0nerik commented Nov 27, 2023

This should be quite easy. I'll look into it when I have some spare time. Increasing the minimum flutter version for a next plug-in version should not be a problem as well.

@dkbast
Copy link
Author

dkbast commented Nov 27, 2023

I actually managed to get it to work on a mac only spike - two might be issues: permission handler does not support mac yet (PR seems to be open), so I had to bale that in and there are different imports for mac and ios needed - not sure how to solve that yet - but should be doable.
Will push my proof of concept soonish

@dkbast
Copy link
Author

dkbast commented Nov 27, 2023

@s0nerik - this is my "working poc" for a mac implementation - only minor changes, mostly copy paste from ios:
https://github.com/dkbast/fast_contacts_mac

An implementation without its own permission handling would depend on Baseflow/flutter-permission-handler#1207 to land

@s0nerik
Copy link
Owner

s0nerik commented Aug 8, 2024

Thanks for your effort, I'll look into this soon and add the support if that's not too time-consuming.

@amrgetment
Copy link

amrgetment commented Aug 27, 2024

I am interested in macOS support

@dkbast I overridden the permission handler and I added the permission setup in
dkbast/fast_contacts_mac#1

@s0nerik this is the testing result, it works only when I run from Xcode not vscode

Screen.Recording.2024-08-27.at.3.05.40.PM.mp4

@amrgetment
Copy link

@dkbast Any idea why it works from Xcode but not from Vscode
in Vscode it returns always permission denied permanently while it works fine from Xcode!!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants