{"id":133,"date":"2014-02-05T09:32:26","date_gmt":"2014-02-04T20:32:26","guid":{"rendered":"http:\/\/templesoft.co.nz\/journal\/?p=133"},"modified":"2026-04-08T08:19:28","modified_gmt":"2026-04-07T20:19:28","slug":"upgrading-davical-to-support-ios7-devices","status":"publish","type":"post","link":"https:\/\/templesoft.co.nz\/journal\/?p=133","title":{"rendered":"Upgrading DAViCal to support iOS7 devices"},"content":{"rendered":"<h2 style=\"text-align: justify;\">Are we speaking the same language?<\/h2>\n<p style=\"text-align: justify;\">In a previous <a title=\"Creating your own calendar server\" href=\"http:\/\/templesoft.co.nz\/journal\/?p=81\" target=\"_blank\">post<\/a>, I went through how to build a calendar sever using DAViCal &#8211; created by fellow kiwi <a href=\"http:\/\/andrew.mcmillan.net.nz\/\" target=\"_blank\">Andrew McMillan<\/a>.<\/p>\n<p style=\"text-align: justify;\">The server has run perfectly since the day I built it, and it was only recently (read: last year) that I noticed I was no longer getting my event reminders on my iPhone. I had recently upgraded to iOS7 and assumed that maybe the authentication information had probably got scambled during the upgrade, so I deleted and re-added the user information but failed to rectify the problem. It still worked fine on my first gen iPad using iOS6 so I knew it had to be related to the upgrade.<\/p>\n<p style=\"text-align: justify;\">After scouring the web for a solution, I discovered I wasn&#8217;t the only person having problems&#8230; and it wasn&#8217;t just with DAViCal. There was a lot of finger pointing and wringing of hands, but at the time I couldn&#8217;t find any solution to fix it.<\/p>\n<p style=\"text-align: justify;\">I keep checking the author&#8217;s website, the DAViCal website and hoped there would be a package update but alas nothing appeared. As time marched on my interest waned until one day I forgot all about it.<\/p>\n<h2 style=\"text-align: justify;\">A fix found&#8230;<\/h2>\n<p style=\"text-align: justify;\">The other day I got to thinking about my iPhone (in particular iOS7) and the how the various revisions to the iOS software had failed to fix my calendar problems. Armed with renewed vigor I jumped on the web and had a look to see if there were any fixes&#8230; and to my joy, discovered this post <a href=\"http:\/\/www.inf-it.com\/davical\/\" target=\"_blank\">here <\/a>(well, found a forum which ultimately linked to that location).<\/p>\n<p style=\"text-align: justify;\">I copied the files, updated the database, and&#8230; success! Cross-platform access to read\/write calendar entries!! For anyone else looking for the similar steps, here&#8217;s what I did.<\/p>\n<h3 style=\"text-align: justify;\">Step one: Get the update<\/h3>\n<pre>sudo wget http:\/\/www.inf-it.com\/fixes\/DAViCal_GIT-latest.tgz\r\nsudo tar -zxvf DAViCal_GIT-latest.tgz\r\ncd DAViCal_GIT-latest\/davical<\/pre>\n<p style=\"text-align: justify;\">If you want a fallback option, it might be worth backing up the existing files for both davical and awl. I&#8217;m using mine on an Ubuntu server so my files are located in <strong>\\usr\\share\\davical<\/strong> and <strong>\\usr\\share\\awl<\/strong>.<\/p>\n<h3 style=\"text-align: justify;\">Step two: Copy the files<\/h3>\n<pre style=\"text-align: justify;\">sudo cp -vR \/davical\/* \/usr\/share\/davical\/\r\nsudo cp -vR \/awl\/* usr\/share\/awl\/<\/pre>\n<h3 style=\"text-align: justify;\">Step three: Update the database<\/h3>\n<pre>sudo cd \/usr\/share\/davical\/dba\r\nsudo wget http:\/\/www.inf-it.com\/fixes\/caldav_functions-fix2.sql\r\npsql -U postgres davical &lt; caldav_functions-fix2.sql<\/pre>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #ff6600;\"><strong>Note:<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #ff6600;\">When I originally created the database I must have used the &#8216;<strong>postgres<\/strong>&#8216; superuser. This meant that when I tried to update the database using the user &#8216;<strong>davical_dba<\/strong>&#8216; I got a permission error. The original command in the sql file was:<br \/>\n<\/span><\/p>\n<pre style=\"text-align: justify;\">psql -U davical_dba davical &lt; caldav_functions-fix2.sql<\/pre>\n<\/blockquote>\n<h3 style=\"text-align: justify;\">Step four: Restart the server<\/h3>\n<p style=\"text-align: justify;\">For good measure I restarted the server, but one restarted I had no problems adding calendar entries on my iPhone, and viewing others I&#8217;d created on other calendar applications (namely Thunderbird+Lightning).<\/p>\n<h2 style=\"text-align: justify;\">Notes on the PostgreSQL superuser<\/h2>\n<p style=\"text-align: justify;\">If you&#8217;re like me and the ravages of time play havoc with your memory (i.e. you forgot your <strong>postgres<\/strong> user password) don&#8217;t panic: you can reset it using the following steps&#8230;<\/p>\n<pre style=\"text-align: justify;\">sudo vi \/etc\/postgresql\/8.4\/main\/pg_hba.conf<\/pre>\n<p style=\"text-align: justify;\">change the line for the postgres user to read<\/p>\n<pre style=\"text-align: justify;\"><span style=\"color: #339966;\">local\u00a0\u00a0 all\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 postgres\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 trust<\/span><\/pre>\n<p style=\"text-align: justify;\">then restart the server.<\/p>\n<pre style=\"text-align: justify;\">sudo \/etc\/init.d\/postgresql restart<\/pre>\n<p style=\"text-align: justify;\">Log into PostgreSQL and at the postgres prompt (postgres=#) change the password&#8230;<\/p>\n<pre style=\"text-align: justify;\">psql -U postgres\r\n\r\n<span style=\"color: #0000ff;\">postgres=# <strong>ALTER USER postgres with password '<\/strong><span style=\"color: #ff0000;\"><em>secure-password<\/em><strong>'<\/strong><\/span>;<\/span><\/pre>\n<p style=\"text-align: justify;\">where <span style=\"color: #ff0000;\"><em>secure-password<\/em><\/span> is a password of your choice.<\/p>\n<p style=\"text-align: justify;\">Change the <strong>pg_hba.conf<\/strong> file back&#8230;<\/p>\n<pre>sudo vi \/etc\/postgresql\/8.4\/main\/pg_hba.conf\r\n\r\n<span style=\"color: #339966;\">local\u00a0\u00a0 all\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 postgres\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 md5<\/span><\/pre>\n<p>then restart the server.<\/p>\n<pre>sudo \/etc\/init.d\/postgresql restart<\/pre>\n<p>Log in to <strong>psql<\/strong> to make sure the new password is effective.<\/p>\n<pre>psql -U postgres<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Are we speaking the same language? In a previous post, I went through how to build a calendar sever using DAViCal &#8211; created by fellow kiwi Andrew McMillan. The server has run perfectly since the day I built it, and it was only recently (read: last year) that I noticed I was no longer getting&#8230;  <a class=\"excerpt-read-more\" href=\"https:\/\/templesoft.co.nz\/journal\/?p=133\" title=\"Read Upgrading DAViCal to support iOS7 devices\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[66,65,110,107,108,106,111,67,109],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-technical-resource","tag-calendar","tag-davical","tag-davical_dba","tag-ios","tag-ios7","tag-iphone","tag-pg_hba-conf","tag-postgresql","tag-psql"],"_links":{"self":[{"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=133"}],"version-history":[{"count":5,"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":168,"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=\/wp\/v2\/posts\/133\/revisions\/168"}],"wp:attachment":[{"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/templesoft.co.nz\/journal\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}