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

Contacts usage can't be granted due to lack of Info.plist entry #112

Open
itsjunetime opened this issue Jun 29, 2023 · 0 comments
Open

Contacts usage can't be granted due to lack of Info.plist entry #112

itsjunetime opened this issue Jun 29, 2023 · 0 comments

Comments

@itsjunetime
Copy link
Collaborator

If the config file specifies contacts_mode: mac, mautrix-imessage fails to start up on my machine due to not being able to request contacts permission (it runs the [CNContactsStore requestAccessForEntityType:completionHandler:] method, but nothing is prompted to the user). I think this occurs due to the lack of embedded Info.plist including the key NSContactsUsageDescription (see this stackoverflow link). It seems that the Info.plist can be fairly easily embedded into the final binary with the go flags specified in this article under the section "The One Weird Linker Trick": https://pcable.net/posts/2020-11-14-inetaccesspolicy/

I suspect this doesn't appear when people use the self-hosted bridge through beeper-desktop due to the fact that the user has already granted permission to beeper-desktop, and mautrix-imessage is (maybe) running as a subprocess of beeper-desktop. It's also fairly easy to work around by specifying contacts_mode: disable.

I can probably file a PR at some point to fix this if it's desired, but I also understand if this is not expected to work since it's a weird use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant