简体   繁体   中英

What is the equivalent of Android content provider in IOS?

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.

There's a way to share content between apps via keychain if one wanted to in iOS. I think this is the closest I can think of that is equivalent to the content provider in Android.

Good reference here: http://shaune.com.au/ios-keychain-sharing-data-between-apps/

In iOS we can share data between apps having same group id.

[iOS App Group] allows you to share data between between different processes from the same development team

[iOS App Extension] allows you to share common functional

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM