Check if IPhone is Syncing a Contact Group with Outlook - iphone

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.

Related

Google CardDAV for Contacts - Read Only?

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.

Event While deleting the app from iPhone [duplicate]

This question already has answers here:
How to catch application uninstalling on device and let server know about this (iOS/Android)
(2 answers)
Closed 9 years ago.
I wish to hit a web service, whenever a user deletes the app from his/her device. Its just to delete that user from Db. Can anybody here help me?? Thanks In Advance..
Generally speaking, what you are attempting is probably not advisable. Even if it were possible to know when a user has deleted the app, how would you handle the situation where the user then re-installed the application and launched it? You also do not know why the user has deleted the app (perhaps they only wish to do so temporarily to free up space on their device? Perhaps their device was stolen and they are re-installing into a new, or upgraded device?)
If you separate your concerns (client has/does not have mobile app, vs client has/does not have active account) you can manage all these scenarios in a much more robust way.
Using an in-app analytics package (like Google Analytics, Parse or Flurry to name just a few) will give you insight as to your user behavior, and perhaps based on this usage data you can trigger handlers. For example, if you see a user has not used your app in a certain period you can email them or send a push notification to remind them? Perhaps you could email them to notify them "You have not logged in in 60 days, if you do not use your account within the next 30 days it will be deleted. Click here to re-activate your account."
No, can't do. There is no defined notification when an application is deleted. If you must talk to a server, suspend inactive accounts after a predefined time limit.
One other thing you can try is check for the UIApplicationWillTerminateNotification notification. Save the state of your app on your servers when it's transitioning to the background and cross your fingers your user will not delete your app when it's not running. Because once your app closed, you don't have any control anymore. Thats the iOS behavior till iOS 6.
There is no way you could know whether the app is deleted from device or not because no delegate method fires when the app is deleted.
Hope it helps you.

Remote Wipe out an iOS Application

I have developed an iPad application and I have distributed that application to my clients. Now my clients ask what will happen if their iPad lost or stolen. My iPad application has very sensitive data. So they need to wipe out remotely if iPad is stolen or lost.
I found two solutions.
One is configure 'Find My iPad' in each iPad with same apple account.
Second one is configuring MDM server with push notifications.
If I'm going to configure MDM server I need to contact third party vendor who supports push notifications service of apple or I need to buy Lion Server and configure profile Manager.
Can some one tell me what is the best solution to implement and pros and cons of these two options.
Push notifications won't help you here - they only will pop up a message to the user, you cannot influence the app from them.
Possible solutions:
Protect your app with username / password: Each user should choose a username and password, store those in the keychain and check on app start. Of course you should also encrypt all data with the password when storing it to the device.
Like said above, implement a server request which gets the unique id of the installed app (of course you'd have to create one first on first app startup), returns whether the app is reported as stolen and then either do nothing or delete all data. I'd be careful about deleting though in case there was an error somewhere in your implementation and you wipe out a 'normal' application's data. Also in this case I'd encrypt any sensitive data that is stored to the device. This solution also won't work when the app is offline, of course.
Just make a web service and get response from server, and after getting response , run your application otherwise kill.
if(stolen)
exit(0);
else
run

What folders and files gets backed up through iTunes?

Everytime I get a call my old wallpaper shows even though I have a new one. I'm trying to find it on my iOS but I cannot seem to figure out where. So I'm trying to track down what folders gets backed up when i backup my iPhone since I have restored it and it's still there.
(I'm using a jailbroken device)
I know this isn't the actual folder names and etc but it will give you an idea what it's backing up though. Good Luck.
With iOS 1.1 and later
Safari bookmarks, cookies, history,
and currently open pages
Map bookmarks, recent searches, and
the current location displayed in
Maps
Application settings, preferences,
and data
Address Book and Address Book
favorites
Calendar accounts
Wallpapers
Notes
Call history
Mail accounts
YouTube bookmarks
SMS messages
Saved suggestion corrections (these
are saved automatically as you reject
suggested corrections)
Camera Roll (photos and screenshots
taken by the iPhone)
Voicemail token (This is not the
Voicemail password, but is used for
validation when connecting. This is
only restored to a phone with the
same phone number on the SIM card.)
Web clips
Network settings (saved Wi-Fi
hotspots, VPN settings, network
preferences)
Paired Bluetooth devices (which can
only be used if restored to the same
phone that created the backup)
Keychain (this includes email account
passwords, Wi-Fi passwords, and
passwords you enter into websites and
some other applications. The keychain
can only be restored from backup to
the same iPhone or iPod touch. If you
are restoring to a new device, you
will need to fill in these passwords
again.)
With iOS 2.0 and later (in addition to the above)
Managed Configurations/Profiles
List of External Sync Sources (Mobile Me, Exchange ActiveSync)
Microsoft Exchange account configurations
Nike + iPod saved workouts and settings
App Store application data (except the application itself, its tmp and caches folder).
With iOS 3.0 and later (in addition to the above)
Videos in Camera Roll
Per app preferences allowing use of location services
Offline web application cache/database
Voice Memos
Autofill for webpages
Trusted hosts having certificates that cannot be verified
Websites approved to get the location of the device
In-app purchases
New with iOS 3.1: Videos in the Camera Roll that are 2 GB or larger are not backed up (iOS 4 and later will back up videos 2 GB and larger)
All user documents and settings get backed up, Application settings as well as system settings.
Applications each have a Documents folder that user data can be saved to, so thats pretty much what gets backed up for applications, including app preferences.
These are the Wallpaper locations:
/private/var/mobile/Library/SpringBoard/HomeBackground.jpg
/private/var/mobile/Library/SpringBoard/HomeBackgroundPortrait.jpg
/private/var/mobile/Library/SpringBoard/LockBackground.jpg
/private/var/mobile/Library/SpringBoard/LockBackgroundPortrait.jpg
I have manually managed to find out what gets backed up and managed to solve the problem :)
I downloaded the trial of iphone packup extractor http://www.iphonebackupextractor.com/ and found what I was looking for.
Also it seems like I just had to change the lockscreen in the iPhone since the file called LockScreen.jpg was the picture I was looking for but since I had another lockscreen using winterboard I didnt think of this.
Good luck to anyone else who has problems similar to this.

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.