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

iCal generated are not displayed on iOS #27

Open
lidiotduvillage opened this issue Jun 3, 2018 · 11 comments
Open

iCal generated are not displayed on iOS #27

lidiotduvillage opened this issue Jun 3, 2018 · 11 comments

Comments

@lidiotduvillage
Copy link

The invite is shown but hidden immediately. It works fine on https://www.addevent.com/ so there must be something broken.

@davidlagace
Copy link

@lidiotduvillage The most likely reason for this problem is that your iPhone Calendar is getting synchronized with iCloud or another online calendar service and also that your iPhone is set to sync only the recent most events!

Because the startdate of the event in the exemple is in 2013 your phone doesn't synchronise it! To change it, go to Settings > Calendars > Sync ; here you should be able to see '1 month' as the default setting. You can click on this option to change it to 2 weeks, 1 month, 3 months or 6 months or you can also select All Events for syncing everything in your calendar.

Full details here : https://drfone.wondershare.com/iphone-problems/iphone-calendar-problems.html

@lidiotduvillage
Copy link
Author

Thank you for your answer but It's not really helping, I can't ask people using my website to do that. It needs to be fixed in this app.

@123HPES321
Copy link

Try removing the target parameter from the hyperlink.

@lidiotduvillage
Copy link
Author

Actually, I noticed that once I click the "add to calendar icon" it open the atc webpage and then ios ask "this website try to show you a calendar invitaion, allows ?"

If I click fast enough (before the webpage is fully loaded) then the invite is properly displayed and stay.
But If I wait the end of the loading, then once I validate, the invite is shown and hidden immediately

@123HPES321
Copy link

Same for me. If you remove target entirely you won’t get the prompt and it will just open.

@lidiotduvillage
Copy link
Author

Do you mean the <a target="" parameter ? added by atc script ?

@lidiotduvillage
Copy link
Author

Thank you but It does not change anything on my side. The issue occurs on iOS with Safari for instance

@damianvila
Copy link

You should replace the target="_blank" on the links with a "download" parameter (just "download", no value). That way, you force the .ics to download and it's shown properly on iOS.

@lidiotduvillage
Copy link
Author

thank you a thousand times @damianvila that works perfectly ! you made my day

@adynemo
Copy link

adynemo commented Sep 28, 2018

Replace target="_blank" by download is a good solution but if you want to Safari (on Apple's device) open automatically the file you can replace https:// by webcal:// on the url of your file.
In ouical.js replace

[...]
      var href = encodeURI(
        'data:text/calendar;charset=utf8,' + [
          'BEGIN:VCALENDAR',
          'VERSION:2.0',
          'BEGIN:VEVENT',
          'URL:' + document.URL,
[...] 

by

[...]
      var myURL     = document.URL;
      var myURL     = myURL.replace('https://', 'webcal://');
      var href          = encodeURI(
        'data:text/calendar;charset=utf8,' + [
          'BEGIN:VCALENDAR',
          'VERSION:2.0',
          'BEGIN:VEVENT',
          'URL:' + myURL,
[...] 

With target="_blank" Safari open .ics in iCalendar and with download Safari download .ics and open it.

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

No branches or pull requests

6 participants