问题描述:

What is the equivalent of Android's content provider in iOS?

Summary:

A content provider manages access to a central repository of data. A provider is part of an Android application, which often provides its own UI for working with the data. However, content providers are primarily intended to be used by other applications, which access the provider using a provider client object. Together, providers and provider clients offer a consistent, standard interface to data that also handles inter-process communication and secure data access.

Docs:

http://developer.android.com/guide/topics/providers/content-providers.html

网友答案:

If I'm understanding that link correctly, there is no equivalent.

On iOS, apps can't share resources between each other in that way. For security reasons, each app has it's own data and is sandboxed from being able to access the data within another app.

The only ways you could share data between apps is to have some network sync process between your apps, or possibly use UIPasteBoard but that's cumbersome. You can also pass very limited data via the app URL scheme.

相关阅读:
Top