How do I determine that a link is a calendar event from an IOS App and then add it to Calendar?












0















I have written an iPhone App that looks at a webpage. (I have authorized the App to access Calendar.) One of the links is a calendar link. When I look at that link with Safari, I get a message.



https://www.dropbox.com/s/opzhxcrg8ye2z4v/Screen%20Shot%202018-11-23%20at%201.17.15%20PM.png?dl=0



"The website is trying to show you a calendar invite. Do you want to allow it ...". I can then add it to my calendar. However, when I open that identical link inside my app, my app does not recognize it is a calendar link and then I get options to either Open, Add to Read List, copy ...".



https://www.dropbox.com/s/wd7n8n9bz764wih/Screenshot%202018-11-23%2013.20.53.png?dl=0



My question is how to get my App to recognize that a link is a calendar link?










share|improve this question





























    0















    I have written an iPhone App that looks at a webpage. (I have authorized the App to access Calendar.) One of the links is a calendar link. When I look at that link with Safari, I get a message.



    https://www.dropbox.com/s/opzhxcrg8ye2z4v/Screen%20Shot%202018-11-23%20at%201.17.15%20PM.png?dl=0



    "The website is trying to show you a calendar invite. Do you want to allow it ...". I can then add it to my calendar. However, when I open that identical link inside my app, my app does not recognize it is a calendar link and then I get options to either Open, Add to Read List, copy ...".



    https://www.dropbox.com/s/wd7n8n9bz764wih/Screenshot%202018-11-23%2013.20.53.png?dl=0



    My question is how to get my App to recognize that a link is a calendar link?










    share|improve this question



























      0












      0








      0








      I have written an iPhone App that looks at a webpage. (I have authorized the App to access Calendar.) One of the links is a calendar link. When I look at that link with Safari, I get a message.



      https://www.dropbox.com/s/opzhxcrg8ye2z4v/Screen%20Shot%202018-11-23%20at%201.17.15%20PM.png?dl=0



      "The website is trying to show you a calendar invite. Do you want to allow it ...". I can then add it to my calendar. However, when I open that identical link inside my app, my app does not recognize it is a calendar link and then I get options to either Open, Add to Read List, copy ...".



      https://www.dropbox.com/s/wd7n8n9bz764wih/Screenshot%202018-11-23%2013.20.53.png?dl=0



      My question is how to get my App to recognize that a link is a calendar link?










      share|improve this question
















      I have written an iPhone App that looks at a webpage. (I have authorized the App to access Calendar.) One of the links is a calendar link. When I look at that link with Safari, I get a message.



      https://www.dropbox.com/s/opzhxcrg8ye2z4v/Screen%20Shot%202018-11-23%20at%201.17.15%20PM.png?dl=0



      "The website is trying to show you a calendar invite. Do you want to allow it ...". I can then add it to my calendar. However, when I open that identical link inside my app, my app does not recognize it is a calendar link and then I get options to either Open, Add to Read List, copy ...".



      https://www.dropbox.com/s/wd7n8n9bz764wih/Screenshot%202018-11-23%2013.20.53.png?dl=0



      My question is how to get my App to recognize that a link is a calendar link?







      ios iphone calendar icalendar






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 24 '18 at 4:58







      Howard Matis

















      asked Nov 23 '18 at 21:41









      Howard MatisHoward Matis

      64




      64
























          1 Answer
          1






          active

          oldest

          votes


















          0














          One determines what should be in the file by the suffix and the MIME content type.
          For icalendars, the suffix is .ics and the MIME content type is text/calendar. If a link does not have .ics suffix your app can ignore it, if it has a .ics, then it should check the header for the mime-type.



          What is a MIME type?
          https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types



          What a browser or device actually does with the file depends on what the user has set in the settings. EG: a .pdf will topen in the way that the user has told the browser to open .pdf's - either in browser or adobe reader.



          EG in windows for development purposes, I have specified that calendar links (links with suffix .ics) should be opened in my editor rather than my calendar.






          share|improve this answer
























          • Safari is smart enough to know that it is calendar link without any MIME type. My question is how does Safari (or Chrome) know it is a calendar file and my App does not. I did not create the Calendar link so I can't change it. I want to know how to make my App act in the same way without renaming the link which requires me to make a completely new link which is very complicated.

            – Howard Matis
            Nov 24 '18 at 4:55











          • You can determine that it should be a calendar link from the suffix. The suffix should be .ics.

            – anmari
            Nov 24 '18 at 5:31











          • That does not answer my question. I want to get my app to use the link WITHOUT changing the the suffix. As I said Safari and Chrome can tell it is a calendar link so why can't my app. I can't change the suffix because I am using an existing link that cannot be modified.

            – Howard Matis
            Nov 24 '18 at 12:57











          • Here is a link that will open up a calendar event in Safari or Chrome. Notice there is no suffix: oakland.legistar.com/…

            – Howard Matis
            Nov 24 '18 at 19:33













          • Hi Howard, a no suffix url indicates either a rewritten url or a dynamic (eg a php url) . In this case when one 'opens' or clicks on the url, a file "CalendarExport.ics" is received. You don't need to rename as when the url is opened, or requested, "CalendarExport.ics" will be delivered.

            – anmari
            Nov 26 '18 at 1:32











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53453218%2fhow-do-i-determine-that-a-link-is-a-calendar-event-from-an-ios-app-and-then-add%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          One determines what should be in the file by the suffix and the MIME content type.
          For icalendars, the suffix is .ics and the MIME content type is text/calendar. If a link does not have .ics suffix your app can ignore it, if it has a .ics, then it should check the header for the mime-type.



          What is a MIME type?
          https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types



          What a browser or device actually does with the file depends on what the user has set in the settings. EG: a .pdf will topen in the way that the user has told the browser to open .pdf's - either in browser or adobe reader.



          EG in windows for development purposes, I have specified that calendar links (links with suffix .ics) should be opened in my editor rather than my calendar.






          share|improve this answer
























          • Safari is smart enough to know that it is calendar link without any MIME type. My question is how does Safari (or Chrome) know it is a calendar file and my App does not. I did not create the Calendar link so I can't change it. I want to know how to make my App act in the same way without renaming the link which requires me to make a completely new link which is very complicated.

            – Howard Matis
            Nov 24 '18 at 4:55











          • You can determine that it should be a calendar link from the suffix. The suffix should be .ics.

            – anmari
            Nov 24 '18 at 5:31











          • That does not answer my question. I want to get my app to use the link WITHOUT changing the the suffix. As I said Safari and Chrome can tell it is a calendar link so why can't my app. I can't change the suffix because I am using an existing link that cannot be modified.

            – Howard Matis
            Nov 24 '18 at 12:57











          • Here is a link that will open up a calendar event in Safari or Chrome. Notice there is no suffix: oakland.legistar.com/…

            – Howard Matis
            Nov 24 '18 at 19:33













          • Hi Howard, a no suffix url indicates either a rewritten url or a dynamic (eg a php url) . In this case when one 'opens' or clicks on the url, a file "CalendarExport.ics" is received. You don't need to rename as when the url is opened, or requested, "CalendarExport.ics" will be delivered.

            – anmari
            Nov 26 '18 at 1:32
















          0














          One determines what should be in the file by the suffix and the MIME content type.
          For icalendars, the suffix is .ics and the MIME content type is text/calendar. If a link does not have .ics suffix your app can ignore it, if it has a .ics, then it should check the header for the mime-type.



          What is a MIME type?
          https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types



          What a browser or device actually does with the file depends on what the user has set in the settings. EG: a .pdf will topen in the way that the user has told the browser to open .pdf's - either in browser or adobe reader.



          EG in windows for development purposes, I have specified that calendar links (links with suffix .ics) should be opened in my editor rather than my calendar.






          share|improve this answer
























          • Safari is smart enough to know that it is calendar link without any MIME type. My question is how does Safari (or Chrome) know it is a calendar file and my App does not. I did not create the Calendar link so I can't change it. I want to know how to make my App act in the same way without renaming the link which requires me to make a completely new link which is very complicated.

            – Howard Matis
            Nov 24 '18 at 4:55











          • You can determine that it should be a calendar link from the suffix. The suffix should be .ics.

            – anmari
            Nov 24 '18 at 5:31











          • That does not answer my question. I want to get my app to use the link WITHOUT changing the the suffix. As I said Safari and Chrome can tell it is a calendar link so why can't my app. I can't change the suffix because I am using an existing link that cannot be modified.

            – Howard Matis
            Nov 24 '18 at 12:57











          • Here is a link that will open up a calendar event in Safari or Chrome. Notice there is no suffix: oakland.legistar.com/…

            – Howard Matis
            Nov 24 '18 at 19:33













          • Hi Howard, a no suffix url indicates either a rewritten url or a dynamic (eg a php url) . In this case when one 'opens' or clicks on the url, a file "CalendarExport.ics" is received. You don't need to rename as when the url is opened, or requested, "CalendarExport.ics" will be delivered.

            – anmari
            Nov 26 '18 at 1:32














          0












          0








          0







          One determines what should be in the file by the suffix and the MIME content type.
          For icalendars, the suffix is .ics and the MIME content type is text/calendar. If a link does not have .ics suffix your app can ignore it, if it has a .ics, then it should check the header for the mime-type.



          What is a MIME type?
          https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types



          What a browser or device actually does with the file depends on what the user has set in the settings. EG: a .pdf will topen in the way that the user has told the browser to open .pdf's - either in browser or adobe reader.



          EG in windows for development purposes, I have specified that calendar links (links with suffix .ics) should be opened in my editor rather than my calendar.






          share|improve this answer













          One determines what should be in the file by the suffix and the MIME content type.
          For icalendars, the suffix is .ics and the MIME content type is text/calendar. If a link does not have .ics suffix your app can ignore it, if it has a .ics, then it should check the header for the mime-type.



          What is a MIME type?
          https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types



          What a browser or device actually does with the file depends on what the user has set in the settings. EG: a .pdf will topen in the way that the user has told the browser to open .pdf's - either in browser or adobe reader.



          EG in windows for development purposes, I have specified that calendar links (links with suffix .ics) should be opened in my editor rather than my calendar.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 24 '18 at 2:30









          anmarianmari

          2,194197




          2,194197













          • Safari is smart enough to know that it is calendar link without any MIME type. My question is how does Safari (or Chrome) know it is a calendar file and my App does not. I did not create the Calendar link so I can't change it. I want to know how to make my App act in the same way without renaming the link which requires me to make a completely new link which is very complicated.

            – Howard Matis
            Nov 24 '18 at 4:55











          • You can determine that it should be a calendar link from the suffix. The suffix should be .ics.

            – anmari
            Nov 24 '18 at 5:31











          • That does not answer my question. I want to get my app to use the link WITHOUT changing the the suffix. As I said Safari and Chrome can tell it is a calendar link so why can't my app. I can't change the suffix because I am using an existing link that cannot be modified.

            – Howard Matis
            Nov 24 '18 at 12:57











          • Here is a link that will open up a calendar event in Safari or Chrome. Notice there is no suffix: oakland.legistar.com/…

            – Howard Matis
            Nov 24 '18 at 19:33













          • Hi Howard, a no suffix url indicates either a rewritten url or a dynamic (eg a php url) . In this case when one 'opens' or clicks on the url, a file "CalendarExport.ics" is received. You don't need to rename as when the url is opened, or requested, "CalendarExport.ics" will be delivered.

            – anmari
            Nov 26 '18 at 1:32



















          • Safari is smart enough to know that it is calendar link without any MIME type. My question is how does Safari (or Chrome) know it is a calendar file and my App does not. I did not create the Calendar link so I can't change it. I want to know how to make my App act in the same way without renaming the link which requires me to make a completely new link which is very complicated.

            – Howard Matis
            Nov 24 '18 at 4:55











          • You can determine that it should be a calendar link from the suffix. The suffix should be .ics.

            – anmari
            Nov 24 '18 at 5:31











          • That does not answer my question. I want to get my app to use the link WITHOUT changing the the suffix. As I said Safari and Chrome can tell it is a calendar link so why can't my app. I can't change the suffix because I am using an existing link that cannot be modified.

            – Howard Matis
            Nov 24 '18 at 12:57











          • Here is a link that will open up a calendar event in Safari or Chrome. Notice there is no suffix: oakland.legistar.com/…

            – Howard Matis
            Nov 24 '18 at 19:33













          • Hi Howard, a no suffix url indicates either a rewritten url or a dynamic (eg a php url) . In this case when one 'opens' or clicks on the url, a file "CalendarExport.ics" is received. You don't need to rename as when the url is opened, or requested, "CalendarExport.ics" will be delivered.

            – anmari
            Nov 26 '18 at 1:32

















          Safari is smart enough to know that it is calendar link without any MIME type. My question is how does Safari (or Chrome) know it is a calendar file and my App does not. I did not create the Calendar link so I can't change it. I want to know how to make my App act in the same way without renaming the link which requires me to make a completely new link which is very complicated.

          – Howard Matis
          Nov 24 '18 at 4:55





          Safari is smart enough to know that it is calendar link without any MIME type. My question is how does Safari (or Chrome) know it is a calendar file and my App does not. I did not create the Calendar link so I can't change it. I want to know how to make my App act in the same way without renaming the link which requires me to make a completely new link which is very complicated.

          – Howard Matis
          Nov 24 '18 at 4:55













          You can determine that it should be a calendar link from the suffix. The suffix should be .ics.

          – anmari
          Nov 24 '18 at 5:31





          You can determine that it should be a calendar link from the suffix. The suffix should be .ics.

          – anmari
          Nov 24 '18 at 5:31













          That does not answer my question. I want to get my app to use the link WITHOUT changing the the suffix. As I said Safari and Chrome can tell it is a calendar link so why can't my app. I can't change the suffix because I am using an existing link that cannot be modified.

          – Howard Matis
          Nov 24 '18 at 12:57





          That does not answer my question. I want to get my app to use the link WITHOUT changing the the suffix. As I said Safari and Chrome can tell it is a calendar link so why can't my app. I can't change the suffix because I am using an existing link that cannot be modified.

          – Howard Matis
          Nov 24 '18 at 12:57













          Here is a link that will open up a calendar event in Safari or Chrome. Notice there is no suffix: oakland.legistar.com/…

          – Howard Matis
          Nov 24 '18 at 19:33







          Here is a link that will open up a calendar event in Safari or Chrome. Notice there is no suffix: oakland.legistar.com/…

          – Howard Matis
          Nov 24 '18 at 19:33















          Hi Howard, a no suffix url indicates either a rewritten url or a dynamic (eg a php url) . In this case when one 'opens' or clicks on the url, a file "CalendarExport.ics" is received. You don't need to rename as when the url is opened, or requested, "CalendarExport.ics" will be delivered.

          – anmari
          Nov 26 '18 at 1:32





          Hi Howard, a no suffix url indicates either a rewritten url or a dynamic (eg a php url) . In this case when one 'opens' or clicks on the url, a file "CalendarExport.ics" is received. You don't need to rename as when the url is opened, or requested, "CalendarExport.ics" will be delivered.

          – anmari
          Nov 26 '18 at 1:32




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53453218%2fhow-do-i-determine-that-a-link-is-a-calendar-event-from-an-ios-app-and-then-add%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          To store a contact into the json file from server.js file using a class in NodeJS

          Redirect URL with Chrome Remote Debugging Android Devices

          Dieringhausen