Google CardDAV for Contacts - Read Only? - iphone

I'm looking to use Google CardDAV to push a set of Contacts tied to a specific Google account out to a bunch of iPhone devices using our MDM software. So far everything works - i pointed the software to https://google.com/carddav/v1/principals/mygoogleaccount and the contacts all populate down to the iPhones. But - any change that any user makes to the contact list will be reflected back to the Google account, meaning it will affect all users. Is there a way to make this functionality read only? Maybe create another account that only has read access to the list and push that to the devices instead of using the main credentials? I could probably disable the ability to edit the contacts on the device level, but I don't want to do this, as employees may wish to add their own personal contacts to their individual devices. I just want the master CardDAV list we are pushing out to stay consistent.
Does anyone have experience or any idea how I would accomplish this?
The above pretty much states it all. Looking to deploy a Contact list to a group of iPhones thru an MDM via Google CardDAV, but need the list to remain read-only at the device level. The Internet does not seem to have any information on how to do this.

Related

Find iPhone devices/device tokens in specific radius :-

I want to find iPhone devices/device tokens within a specific radius from particular location.
For example : Within a 25 K.M. of radius from Sydney,i want to get iPhone devices tokens.
I am working on ASP.NET MVC2 for this.
Let me know,if is there any API for that?
Thanks,
You are only able to get details for devices that you 'know' about. Your app will need to log unique IDs for each device, and your app will need to log known locations for devices. It's then up to you to look up, from your central database, the details of the devices within a certain distance. iPhones can update significant location changes when running in the background but it's up to you to track devices and accept the limitations that that data may not always be correct. eg. If a user falls outside connectivity then you will still have an old location logged for that user.
I'm not aware of a single API that offers this services, if you're coding it then in your app you will need to register devices identifiers and location information to a central server. You will also need to create the lookup to query your data to find devices within a location. I am guessing that you might want to send push notifications, in which case your app will also need to register for notification services too.
There is no way for you to discover devices that don't have your app running and you also do not know who the owner is.

How to add a wifi network to the list of known ones in iOS?

I am working on an app that needs to add a wifi network (i.e., SSID and password) to the list of known ones of the mobile phone, so that it connects to that network automatically even when seeing it for the first time.
I already did this on Android, and now I will start working on the iPhone version.
Question: On the iPhone, is it possible to have my app (when it runs for the first time) add a wifi network to the list of known ones of the device, and if so, any hints regarding how to do it?
Thanks a lot.
Unfortunately this is not possible on iOS.
Apple doesn't provide any public APIs to add network SSIDs or passwords.
The most you can do is to enable your app to manage the user's authentication for a public network, (as is done for things like Boingo and The Cloud). In this case, when the user joins a network, instead of a webpage opening to authenticate, your app can launch and provide the authentication - but that is as far as you can go.
We asked for clarification on this point to Apple in the dev forums and were told that it is definitely not possible. (I will try to dig out the link to that post for you when I get more time. Else, search your query on the dev forums and it might show up).
so it would seem that with iOS 6, there may be a way to do this. Boingo appear to allow a user to turn on "Auto Login" and it will login/authenticate against the access point without the user interacting/authenticating manually (I haven't tried it myself though). Is there new API calls in iOS 6 that now allows this? See this article.

Check if IPhone is Syncing a Contact Group with Outlook

Is there a way to programmatically check the accounts an IPhone is syncing with?
I want to check if the user is syncing contacts with outlook, and if so which group of contacts.
If the user is already using outlook to sync contacts than the app will simply let outlook do all the hardwork (the data source is the same). Otherwise the app will add the contacts to the phonebook and manage keeping them in step when the app is running.
So is it possible to check existing sync configurations?
Whats my best approach here?
No, there is no APi you can call to check if the device is syncing.
Do the hard work your self, since there is no way to tell if the device is being synced.

IOS 4.2: Access data (contacts, messages, etc)

Is there a way to programmatically access and modify the core data of the iphone?
I'm making an app for myself, not for the apple store, and I want to be able to access my list of contacts (to delete it) and the list of messages (also to delete it).
I want to make an application with the same behaviour has that feature which allows you to block the iphone in case of theft.
It's being hard to find information about this so any help would be nice :)
/thanks
That's not a particularly helpful answer, because it implies ABAddressBook is going to give you all of the information you want (it isn't). ABAddressBook will give you access to contacts. It won't give you access to messages. Access to SMS and email messages isn't available to developers, for various reasons (privacy, security, etc). So you won't be able to do anything with users messages, because you don't have access to them.
For contact info, use ABAddressBook

iPhone: Need suggestion for SYNC contact

i want to create a application which sync my iPhone contacts to my server and vice-versa.
i read a article on google Get Google Sync on your phone . i want to this type of feature which directly update the contact without user interaction (however one time setting is desired).
any body have idea how the google sync work .
Please advice me that how can i achieve this task. any suggestion and link is greatly appreciated
I think it's important to separate the two overlapping approaches in your question.
Firstly, Google Sync is essentially a way to use Microsoft Exchange protocols and to setup a Mail / Contact / Calendar profile on an iPhone. The iPhone OS supports this feature, not an iPhone App in the App Store. Google Sync leverages this fundamental capability of the phone by exposing the data (mail, contacts, calendars) via these known protocols. If you want to expose data in this way to your users, setup a Microsoft Exchange server and ask questions on serverfault.
Secondly, there are iPhone apps. iPhone apps sold in the app store are not currently allowed to run in the background. This means you can't emulate functionality like iTunes or Mail where your music plays while you are browsing the web, or mail checking is done while you are playing a game of Mini Squadron. If you want this backgrounding capability, file a bug/enhancement with Apple.. However, you can interact with iPhone contacts (Address Book) via the API.. You can also of course "re-invent the wheel" and expose the data however you like via the internet, and consume that data from a custom iPhone App with the one caveat that users would need to actively launch your application to get to this data and it would not be integrated with the built-in iPhone Calendar, Address Book or Mail applications. Some good examples of that are some of the music community apps that have messaging systems built into them. Presumably that is all being done with web services.
EDIT: It is also worth mentioning that should you go the "iPhone App" route, you should at least consider if push notifications are right for you, and if so how you will handle it.
Have you seen the API-Docs?
http://developer.apple.com/iphone/library/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/100-Introduction/Introduction.html
Next there is an application I use called Funambol - it is a sync4j Server/Client. They have an open source application to sync contacts on the iPhone. Source is somewhere in their repository, informations here: http://forge.ow2.org/scm/?group_id=96
As slf told you your application must run in foreground. This may limit you.
Good luck & best regards,
Florian
The 3.0 SDK will allow your application to read contact data on the phone.
Web services will allow you to publish that data to your server, and receive updates.
You may also want to use coredata to store a hash of all contact data so you can tell what is new / updated and just send that data to your server.