Can we get users apple ID synced with iPhone calendar programmatically using swift 3.0

Hi,


One of my applications needs calendar synchronization. Events are added to the email ID from server end.

There are two options for us.

1. Synch Google Calendar with iPhone calendar

2. Try to find get users apple ID (from settings - we assume as it is already synched with iPhone calendar) programatically using swift 3.0 and add events to that ID.


Drawback of Google Calendar Sync:

Users of this application is registered with our server with different email Id's other than Google. We need to cover all the users. At the same time we dont want user to do any manual action from their side in order to perform perform. Few manual actions which we discovered are: creating Google calendar account using existing email ID, once Google calendar account is created then add this accout to the Settings->Calendar->Accounts->Add Account->Other->Add CalDav Account-> (Giver server, Username, Password, description here).


Thus we are thinking to fetch users Apple ID programatically using Swift 3.0 which is already synched to iPhone Calendar and share that Apple ID to server (backend) where events can be added. We also thought of iClod Calendar but again we have to ask all the users to log into icloud, which is not accepted.


Can someone please let us know if we can proceed this approach and correct me if we are voilating Apple privacy Security.


Regards,

Nagraj

Can we get users apple ID synced with iPhone calendar programmatically using swift 3.0
 
 
Q