Import data to iOS app now that iCloud has replaced iTunes

Until now, it was possible to import data into an iPhone application using iTunes file sharing. Data (for example, pdf, doc or custom format will be displayed in the / Documents directory and can be used by the application.

Now that Apple introduced iCloud and changed its iOS Storage Guide (http://developer.apple.com/library/ios/#qa/qa1719/_index.html), it seems that it doesn’t allow you to save a document from PC / Mac for iOS more:

Only documents and other data created by the user or that cannot be re-created by your application should be stored in the / Documents directory and will be automatically supported by iCloud.

And yesterday, I actually abandoned this Apple:

We found that your application does not comply with the iOS Storage Guides, which does not comply with the App Store Review Guide. In particular, your application does not contain user-generated content or content that otherwise could not be re-created by your application.

So here are my questions:

  • Does anyone know what Apple policy will be regarding this? If they do not want to use iTunes Filesharing to import files, they must disable it in iTunes ...

  • What other ways would you suggest importing data into the application? I did not understand how I can import data into the directory of my applications / documents using iCloud from a Mac or PC.

+4
source share
3 answers

Access to iTunes files is still available after iCloud. I just approved the application that uses it.

I think the problem is here in iCloud. You need to mark the files in the document directory that you can recreate, so they are not backed by iCloud.

See http://developer.apple.com/library/ios/#qa/qa1719/_index.html

+1
source

Alright, false alarm ...

This was a misunderstanding on the part of Apple, and the original application was approved after some complaints :) --- I still think they need more sequence diagrams, maybe not automatically backing up files to the cloud that were added by iTunes separation...

0
source

I have the same problem (minus rejection, however, thanks to this post and others): PDF documents (in my case) must be copied to the application via iTunes (like Adobe Reader). They are clearly not created by the user, so this contradicts the iOS Storage Guide.

So, in the end, you got your original application without marking files shared through iTunes, as "do not back up"? You told them that the files in the Documents folder are placed by the user through iTunes, and then they were okay?

I would mark the files as “do not back up”, but I don’t think it’s possible with shared files, because when shared, the files are probably not marked as such, and I can’t assume that my application will see new ones shared files. I can see the document directory, but this does not work if the application does not work ...

It would be great if Apple fixed this. Not to back up shared files by default would be a good idea, because by definition these files are not created by the user / application. Or they may decide to put the shared files in some directory other than the Documents directory (Documents / Shared or something?), And exclude it from the backup.

0
source

Source: https://habr.com/ru/post/1385206/


All Articles