I am trying to create an app which would try to subscribe multiple calendars that are shared on iCloud with links such as
"webcal://p23-calendars.icloud.com/published/2/oR3LtfcYCMGWOJunGttFBWy-dfg0MeVXoIsiqPcBhhs-cjullI1UMVoAzb8biyGC4TFdhzr4CBAhZ1PugqrjKQ_xvyQhQdSN84nejMV4nkU".
As I did some research, I learned that it is possible to just open the URL and let iOS do the rest, like this
UIApplication.sharedApplication().openURL(NSURL(string: URL)!)
However, after doing this the system shows several alerts asking to confirm subscription and whether to view the added calendar, which would be very not user-friendly when a lot of calendars are to be subscribed to.
So is there a way to avoid all the alerts, perhaps by subscribing in code? If that's not an option, how can I add completion block to the alerts shown so that at least I can show the alerts one after another?
I am truly grateful if anyone could help me.