I’m updating an older app that uses MonkeyBread’s EKEventStoreMBS class. Previously, it seemed that when debugging the app, you would be prompted to allow the app to access the calendar. But this was a couple years ago and OS X has seen updates since then.
What do I need to do to request access? The built/compiled version of the app has access. But my debug build does not…
So it appears that in order to get access to the calendar using Christain’s EventKit Classes that the app needs to be signed. How do you sign/wrap a debug app?
If you’re using a recent version of Xojo, look at the macOS build target. There’s a Sign step inside where you can put your signing identity. Otherwise it gets an ad-hoc signature.
Well I dunno about that. Just that I put my Apple Developer ID in the build settings, not something copy/pasted from a certificate. Once you’ve signed up with Apple, that ID remains the same until kingdom come.
I had three certs and some dupes, but I think I just deleted the dupes. I came to realise that I only really needed one - which for developing an app and distributing via a website is Developer ID Application. But their opaque website didn’t make that clear, because there were others that it looked like I should have, too.
I suspect that if I were to want to put apps in the App Store, I’d need a cert for that, although what the point of more than one cert is (or indeed any at all) is a mystery to me.
And if I deleted the 3rd party and the distribution certs, I can build in Xojo fine. My app works and I can access the calendar. However, it does NOT work from a debug app.
And Christian’s EventKit example doesn’t work from either debug or built.
Seems like we found a bug in the Xojo IDE, where it would not report about a broken reference in the project:
So when I copy my example and run it, it doesn’t work.
Up-on inspection, I see the info.plist in the debug version doesn’t get the keys for calendar access.
So I remove the entry and add it again. Run and it works!
Can you try that?