What are the best practices for managing multiple users on an iPad app? - objective-c

What are the best practices for setting up multi user functionality in an iPad app?
I am trying to start an ios project for iPad which will create new username, and password, as well as managing different users on a given device locally on the iPad in order to access the app itself. Something like what keeper does when you first open the app comes into mind.
What are the most suitable practices for achieving something like this? Can anybody point me in the right direction?

The solution I opted for is to create a table with Core Data and store username and a mod5 representation of the password. Unfortunately everywhere I looked it showed that keychain only saves passwords for what it assumes to be the only user using the device.

You can use Sci-fi Hi-fi keychain utils, which is a sweet wrapper around Keychain. It allows storing passwords on a per-user and per-service basis. I'd advise storing your usernames somewhere (CoreData, maybe) and then querying through SFHF to see if the password's valid.

Related

Is there a way we can simplify the UX of adding a CalDav Account in my react-native application?

I work for a company that generates calendars for professionals and we'd like our users to synchronize their calendar on their phone for simplicity's sake. We initially had an ICS file, but we started hitting issues out of our control and we're looking to switch to a full CalDav support.
However, the steps necessary to create a CalDav account can be a bit tedious
( https://www.youtube.com/watch?v=BfPtH8fOLfw ) especially since in our mobile app, we already have an authentified user, we were wondering if there was any way we could do the setup for the user, so he/she doesn't have to switch back and forth to copy/paste the CalDav Account Credentials.
Surprisingly, we've found nothing. No NPM package, no way to simplify this. We did found a way to generate a configuration profile with the data, but we were told to steer clear this idea since some of our customers may be using a company-provided phone and it was possible to prevent any sort of installation through configuration profiles.
Anyone has an idea on how we can make it simple for our users and give them the best UX as possible ?
Thanks :)

How to access Contacts in Windows 8 People app from another app

Does anyone know how to access Contacts in Windows 8 Store apps?
I know that because of the sandboxed nature, Windows Store apps cannot access AddressBook from files such as Outlook Express contacts or Outlook, but since there is already an app called People that comes pre-installed, I figure why not let users make use of whatever Contacts the user has already allowed the app to see, rather than creating separate list of Contacts for my app. It seems silly to recreate the wheel by asking the user to re-import all the contacts again.
I have seen Contact Picker example but I still have no clues how to get list of Contacts/People as in that People app.
I have not developed for mobile phone, however if the device is a mobile phone, surely the app is expected to use local contacts rather than keeping separate list of contacts. So I am thinking there's got to be a way to do the same thing on a PC or any device really, rather than each app managing its own contacts. I have not seen any guidance on how to do this. What are your thoughts?
I asked a similar question a few days ago and, after a lot of research, it looks like it's just not possible to get that information from the people app outside of the contract. The reason that it works within calendar/mail/messenger is because they're all technically contained within the same app and are able to use each other's data and violate normal rules.
A lot of people have pointed me to look at the live SDK, but it still seems like it's not at all possible to get people information in your app, since the SDK doesn't support it anymore.
Look at the ContactPicker class :
http://msdn.microsoft.com/en-us/library/windows/apps/br224913.aspx
Another way is to share your resource or whatever you want to send and user will choose an app that will send or on any another way use your shared resource (url, image, whatever)
IMO the latter is preferred way since then user will have a choice of applications that can send mail or post that resource on facebook / twitter.
Check this sample on ContactPicker

Am I allowed to ask for and store a user's itunesconnect password?

I am building an Apple developer analytics app, which displays info stored in itunesconnect Daily Sales Reports. Thus I would like to automatically download these Daily Sales Reports (which I achieved by using this script). This app will be released on the Mac App Store and is sandboxed.
Am I allowed to ask for and store a user's itunesconnect password?
If so, what is the correct way to do it?
EDIT:
Thank you James and Michael, Keychain Services is definitely the way to go.
I do have one follow up question.
The answer is yes, thank you James and Michael, and the correct way to store it is with Keychain Services. I used an objective-c wrapper that you can find here.
Disregard my earlier comment, I misunderstood your question (I thought you were trying to access a database). If the user gives you the information willingly, there is not problem; the issues would arise if you tried to trick the users into giving you the information. As for the correct way to do this, you could just ask them to put in their password, giving them the ways you would use them. There would, however, possibly be legal issues down the road if you use the passwords in a different way then you tell the user.

iOS App Persistent Settings After App Deleted

We are creating an app as follows:
User starts with 2 free "tokens"
User can buy a pack of 10 tokens with $.99 in-app purchase
We have implemented this using NSUserDefaults to save the number of tokens.
Is there a way to make our free 2 token setting persistent? Even if they delete the app? Right now you can delete the app and reinstall to get 2 tokens again. iOS 5 has NSUbiquitousKeyValueStore for saving settings to iCloud, is that any better?
If not we will have to use a web service for this...
NOTE: This app is in MonoTouch, but probably irrelevant to the question. Also, in our app, the user wouldn't care to reinstall the app to get 2 more tokens (there is no other settings or game progress they would lose).
Just my 2c as #Almo covers most of this already and should get the credits :-)
NSUbiquitousKeyValueStore has the advantage of being by-user, e.g. several devices would share the same free tokens. OTOH that might not be something you want in your app...
Leaving data after uninstallation goes against the sandboxing of applications. There are ways to do it, like you can add images/photos/contacts/..., but unlikely to be "Apple approved" and more than likely easy to hack around.
So I also suggest you to use a web service. A simple way would be to validate with the service (e.g. using the device's MAC address since the device unique identifier is going away) when no application data is found (install and re-install) if it's a know device (no token) or not (get tokens).
If the paid tokens are re-usable (could be re-played by re-installing a backup that includes them as data) then you might want to track them with the web service. Non-reusable tokens won't suffer from this (and are likely easier to deal with).
You can set token to the Keychain. If the user uninstall app and install it again you can restore token from the Keychain.
sskeychain
Even if you try to make the setting persistent, I don't think it would be that hard for them to find that and delete it as well during a reinstall. If you want to prevent just casual cheating, maybe that's fine. But if this is your revenue stream, I'd recommend using a webservice.
Edited to add: I don't have any experience with iCloud. That might make sense, too.

Writing an API for an iPad app for other apps to use - is this possible?

I am hoping to create an iPad app to do the following:
Download data from a user's machine/local server
Encrypt this data and store it securely on the iPad
Provide an API so that others can write specially signed apps that query this API to access the secure data.
Its is the last requirement I am starting to think is "impossible". Does anybody know whether it is possible or not and if not of any solutions?
Thanks
If you want to share data between applications, a good solution is to create a custom clipoard type, and have both applications access it.
You can also write your data in a file, and ask iOS to open that file in another application. This other application will then open and decrypt the contents of this file.