Wednesday, February 27, 2013

NSDocumentsDirectory and iCloud issue :preventing files in a App's Documents Directory being synced to iCloud

Many of you guys use app's  "Documents Directory" to store your files(image,video,pdf,music etc) in iOS app and being an iOS developer, it's obvious that you use documents directory since for each app,its the best way to store your files on the device permanently ,so that your app can  function properly in offline mode too.
However, if you are trying to store large number of files (obvious referring both in quantity and size) in app's documents directory, then i will say STOP & WAIT!!! 

- "STOP" because your app gonna be rejected by Apple because according to Apple's latest iOS Data Storage Guidelines : "Since iCloud backups are performed daily over Wi-Fi for each user’s iOS device, it’s important to ensure the best possible user experience by minimizing the amount of data being stored by your app." In summery i will say there are two points, every files in NSDocumnetsDirectory will be synced to user's iCloud and another is,if file sizes stored in NSDocumnetsDirectory are large then Apple will reject it since that causes the slow down on syncing process as iCloud-device syncs on daily basis.
-"WAIT" because i have a solution for it.
As pointed above if you are going to save files in NSDocumentDirectory then it will be back-up to iCloud,that means any thing you store in documents folder, will be synced to user's iCloud and will be publicly available. So if your files stored in documents directory  makes no sense by being public then you don't have to worry about anything(unless its size is bigger), but if your file  stored there are large in size and  can not be public,or i say if these files are only intended just for the scope of your app then you must have to do extra work to prevent from being synced to iCloud.

There are two solutions for it :

Monday, February 25, 2013

Sharing your app via Facebook and Twitter using Social Framework

Hello Guyz, in this section i will be describing about how we can use new "Social Framework" for sharing our app(tweet+status) from our iOS apps. It's really easy to deal with but, we should keep in mind that Social framework is only available from iOS 6 and later . Here, we will be only focusing on how to share our app , along with how to tweet and post a status from our iOS app.



1. Add "Social.framework" in your project.
2. Include  #import <Social/Social.h> to your .h file
3. Now, in your sharing method :

Tuesday, February 5, 2013

Ad-Hoc Distribution of iOS Apps - Simple Solution

If you are searching for a blog that describes the better way to do a ad hoc distribution of your iOS apps, I simply prefer you to go through : http://www.diawi.com/ 
This is the perfect way of distributing and installing iOS apps on real device. We don't need to sync app  through iTunes and even we do not need any computers, we can simply download it on our device and install it.

Note : Before proceeding, first make .ipa or .app file of your project from Xcode since in this section i am not talking about how to make .ipa/.app file from xcode but i am talking about how to send your apps to the end test users in a simplest and efficient way.

Best of Luck !!!