Inviting event attendees programatically on iOS 10 - ios

I've been using Stackoverflow for about 5 years now, and haven't felt the need to ask a single question yet, I've always found the answer i needed through previous threads. That just changed and I have a question that I really can't figure out. And it sounds so easy to do.
So the question is; how do you invite attendees, or reply/decline to calendar events on iOS under iOS 10? And please, no we don't want to bring up an EKEventViewController. We'd like to do this in our own UI. Under iOS 9 this was possible through just forcing EKAttendees objects in to the EKParticipants array with setValueForKey:. But under iOS 10 this produces an error saying 'Attendees can't be modified'.
I have used a Technical Support credit with Apple and got the reply that this was not possible. It is not possible using their APIs.
The closest to an answer i've got is to use IMIP (https://www.rfc-editor.org/rfc/rfc6047#section-2.2.1). If that's the way to go, could someone help me along on how to actually set that up? I'm not well versed in back-end development, I'm all front-end so I wouldn't really know where to start.
There also seems to be some CalDav servers on GitHub (https://github.com/mozilla-b2g/caldav) but I'm not sure how good they are, or exactly what you need to set one up.
So basically, is there anyone who could give a childs explanation to just how the heck we can send nice invites to calendar events. And if there are different solutions for Google, Apple accounts (obviously under the hood, but implementation-wise) that would be very helpful to know to.
Is this something that requires a ton of implementation on our own servers or is there some reliable service to use? That would be ideal. Maybe you should build one and you got at least one customer here :-)
Appreciate any help!

You cannot modify attendees using EventKit, but Apple already told you that:
I have used a Technical Support credit with Apple and got the reply that this was not possible. It is not possible using their APIs.
The hack with accessing the internal objects using KVC was, well, a hack and not documented API. No surprise they killed that.
So how do calendar invites work. That in itself is a very complex topic (consider delegation, resource booking like rooms, etc etc). There is a whole consortium which works on that (CalConnect), they also have a broad overview: Introduction to Internet Calendaring and Scheduling.
If you are serious into scheduling/calendaring software, it may make a lot of sense to join CalConnect for their interop events etc.
But you wanted a 'childs explanation'. I can't give that, but a short overview.
iTIP
iTIP is a standard which defines how scheduling messages flow, e.g. that you send a message to your attendee, your attendee responds back with accept/decline, what happens if a meeting is cancelled and all that.
It does NOT however specify how those messages are transferred. It is just a model on how the message flow works between the organiser and the participants.
Most 'big' calendaring systems (Exchange, Google, CalDAV servers like iCloud) use iTIP or at least something very similar.
iMIP
iMIP is a standard which defines on how to exchange iTIP messages using email. Say if you invite someone using iMIP, you'll send him a special email message with the iCalendar payload containing the invite. If your attendee accepts, his client will send back another iCalendar payload via email containing that.
iMIP is supported by a lot of systems and was, for a long time, pretty much the only way to exchange invitations between different systems (say Outlook and Lotus Notes).
However: the iOS email client does NOT support iMIP (unlike macOS or Outlook). So if someone sends you an iMIP invite to your iOS device, you won't be able to respond to that. (reality is more complex, but basically it is like that)
CalDAV
CalDAV is a set of standards around calendars stored on a server. Many many servers support CalDAV. E.g. iCloud uses CalDAV. Yahoo, Google, etc all support CalDAV. The important exception is Exchange, which doesn't support it.
In its basic setup CalDAV just acts as a store. You can use HTTP to store (PUT) and retrieve (GET, etc) events and todos using the iCalendar format.
In addition many CalDAV servers (e.g. iCloud) do 'server side scheduling'. That is, if you store an event to the server which is a meeting (has attendee properties), the server will fan out the invitations. Either internally if the attendees live on the same server, or again using iMIP.
Exchange
Exchange supports iMIP but not CalDAV. You usually access it using one of its own web service APIs, e.g. ActiveSync or Exchange Web Services. I'm no expert on them, but I'm sure that they allow you to create invites. Exchange&Outlook have an iTIP like invite flow.
etc
Is this something that requires a ton of implementation on our own servers or is there some reliable service to use?
This really depends on your requirements and needs. Do you need to process replies or just send out generic events?
If you want to host a calendar store, it probably makes sense to use an existing CalDAV server.
Calendar invitations are a very complex topic and you need to be very specific on your actual requirements to find a solution. In general interoperable invitations in 2017 are still, lets say 'difficult'.
P.S.: Since you've been using StackOverflow for about 5 years now, you should know that this question is too broad for this thing.

Related

are google forms privacy-Preserving?

Is google form a Privacy-Preserving way to conduct a survey?
some people are not comfortable with it. Is it because most people have a google account and if they do not go on private mode, they give more information about themselves to google? does google use the responses?
No.
The contents of google forms (which usually feed into google spreadsheets) is shared between the submitters (only their own data, obviously), you as the form owner, and the entirety of google's internal infrastructure.
Google using the data directly would be a really major infraction, just as it would be if they acted on the contents of a gmail account, however, they have plenty of scope to use the information in indirect, less-obvious ways. For example, the data that someone submits in a form could be used on other sites for ad targeting. Google does this in gmail; if someone sends you an email about something, you can expect to see ads on that subject both within gmail and on other sites. To be fair, they may have stopped that particular practice, but the wider point is that you really can't tell.
"Private mode" is irrelevant in this case; it gives very little protection to start with, and if a form requires you to be logged in to a google account, they know exactly who you are anyway.
On top of this you have the problems caused by the Schrems II judgement that effectively made it illegal to store any personal data (in the GDPR sense) in the US about people in the EU. Prior to this judgement, Google relied on the Privacy Shield arrangement and "Standard Contractual Clauses" (SCCs) to allow this. Privacy Shield is simply dead, and while SCCs are valid in general, they are not usable in the US (though both Google and Facebook have been trying to gaslight to the contrary) because the ongoing lack of US federal privacy laws and the persistent overreach of US security agencies renders it impossible to make their claims valid. This is unlikely to change in the near future.

Database for Real Time Queries/Push Notifications

I am looking to build an iOS app and website that work 'together'.
What the plan is for each:
On the iOS side, it will be pushing information to the server in the form of a post. The users will then be able to vote up and down on the posts as well; which also implies they will be able to see the other users information (in real time).
The website will be viewing this information in real time and using the posts. If a post gets enough down votes the server should tell the website and apps to remove it.
I have experience with SQL. Although SQL does not seem to be the appropriate server choice - for what I want to do - given my experience with it. (I could definitely be wrong.)
I would like to host the information myself, however have heard that Parse is good about holding information for iOS apps. I just don't know whether it gives you enough freedom to work with websites as well.
TL;DR: What kind of database/datastore should I use for a real time queries that allows for push notifications?
All suggestions are welcome. Thank you.
Try Using FireBase
firebase.google.com
Documentation

Get public users of a service (Tumblr, Twitter)

Assuming it's not available as part of API, how can one obtain a full or partial list of public users of a web service, e.g. Twitter, Tumblr, YouTube?
Acceptable alternative: get a random public user.
I was interested in this for testing APIs with a random account. This is useful to catch edge cases when developing an app for the API; For example when developing a Tumblr theme, seeing what volumes of text/images are posted, special character use, and so on.
Can you even imagine a full list of (public) users of largely used web services? That's a vast load of data. I hardly believe that any API would offer that for many reasons:
performance/load issues,
data/information privacy,
abusing possibilities,...
For regular usage of the service's API you simply don't need that. Otherwise it would stink with some gray/black techniques.
Anyway to answer you question objectively: In order to get full or partial list of users from web service it have to provide any kind of API which would allow you to do that. So good starting point is to look at documentation, for example Twitter API, Youtube API, etc...
By swift look I don't see any method that would offer that. It might change in the future but as mentioned above I strongly doubt about that.
Another option is to mine partial list of users via search APIs or traversing the site with a robot. Also obtaining such a list is an option. However I would check whether this is even legal and not against terms of use or something like that.

How to pull down bank transaction records?

I have noticed that some applications provide functionality allowing the user to pull down transaction records (usually for credit cards) from an online banking system. Usually specific banks are supported.
What is the general method to achieve this (i.e., using an API, or something else)? I have seen a web app that supports the bank that I want to pull down transaction records from (ANZ), so I know it's achievable - but have not been able to find any references to any kind of online banking API.
I intend to implement a solution in Ruby on Rails, but I imagine the underlying method would hold regardless of the language used.
Perhaps the bankjob gem might be useful:
http://bankjob.rubyforge.org/
Contact the bank in question and ask them for their API - most of the information you want relates to the security/automated logon issues. the actual data is usually just transferred as a CSV file.
I know easier said than done, but be persistent until you actually are talking to someone in the IT area who can answer questions and not just lawyers and front people. It helps to do some of this in person rather than by email or phone - banks are conservative organizations after all (and if your money is in that bank you want them to be).
EDIT:
Now when dealing with banks don't be surprised if you run into stuff like this:AMEX Security - what's behind this jaw dropping stupidity? - a legacy mainframe system that only accepts 6-8 character, lowercase, alphanumeric entries with no spaces and no special characters. This is why most banks are reluctant to let people know about any outward facing APIs.
Hi I know this is 6 years later but... I thought i would answer it so that future users(like me ) could come up with a solution.
Banks now have api's so you could use something like httparty gem to parse api data.
A simple option is yodlee and their api, or if using rails the Yodlee-icious gem.
hope that helps.

Interacting with Outlook appointments using rails

I have a rails application running on a Linux server. I would like to interact with Outlook/Exchange 2003 appointments from the rails application. For example, certain actions should trigger sending an appointment, and then preferably accepting/canceling the appointment in Outlook should trigger events in the application.
Failing this, is it possible to publish calendars that Outlook 2003 can read without requiring Outlook plugins? I note that Outlook 2003 does not support ical without plugins for example. Similarly, if this is not easily doable in Ruby, but is in another language (such as Perl for example) running on Linux then those suggestions would be welcome.
Any advice on how to achieve this, or where to start looking for answers would be gratefully received.
Outlook appointments are just e-mails with special header information. There's some information in this tutorial on the required parts. I sent a few meeting invites from my Outlook to my Gmail account and took a look at the raw headers there - you can figure most of the protocol out from that.
The iCalendar specs may help you, as well.
Thanks for everyones help. I found something that showed me how to do this with Perl, and ported it over to ruby. I've blogged about it for those looking for a solution
If you can upgrade to Exchange 2007, you can use Exchange Web Services that is more powerful and convenient to use than WebDAV.
At work, I inherited a Rails app that allow users to create single appointments. I was asked to write code to link those appointments in the app to users' outlook calendars, so that they are always in sync. Sounds to me very similar to what you want to do.
I don't think I'm allowed to publish the exact code I wrote though. Anyway I'll give you a bit idea on how I addressed it.
Exchange Web Services only provide API in C# (no surprise, it's Microsoft. Technically, you can use other languages since it's actually SOAP.). I wrote a middleware in C# that does the sync between Exchange server and the Rails app. When users do scheduling in the app, changes are sent to the middleware so changes can be reflected to their outlook calendars. Meanwhile, the middleware registers Push Notification subscriptions for all users -- every time changes are made in Outlook, the middleware will be immediately notified, which in turn faithfully reflect those changes in the app as well. Of course, recurring appointments are also supported.
Hope that helps you.
Take a look at the project RExchange on github.
For accessing appointments, you can just access the Calendar folder on Exchange using WebDav. For creating appointments, please refer to RFC2445 for details.
Further to ceejayoz's comment, you can also use ActionMailer to catch the replies that are sent back, and act on them - you'll need some form of unique id in a place that will be included in the reply though.

Resources