Communication and data sharing between IOS applications

Source: Internet
Author: User

The iOS platform cannot share data directly through the file system.

1,Use uidocumentinteractioncontroller

Restricted by the uidesign of uidocumentinteractioncontroller, it can only support up to 6 third-party applications,
On ios6, uidocumentinteractioncontroller is abandoned and replaced by uiactivityviewcontroller, which provides more flexible solutions.

 

2,Use uiactivityviewcontroller

As mentioned above, the first scheme is abandoned in ios6, and the alternative scheme is uiactivityviewcontroller, so this is very similar to the first scheme. In terms of UI, the paging panel solves the problem of a maximum of six third-party applications. In addition, you can create your own uiactivity subclass to provide customized services.

 

3,Use keychaingroup access

Since ios3.0, we have shared keychain data between apps of the same family. Here, apps of the same family refer to apps with the same bundle.
Seed ID application [the application ID developed by Apple is composed of two parts, <bundle seed ID>. <bundle
Identifier>].

 

4,Customized urlscheme

Allows data transmission between applications through URLs. URL scheme is a common solution for communication between applications on the iOS platform.

 

5,Web Service

Share data through third-party services (such as Dropbox) or custom servers. [of course, you can also create a web
Server, but if the app enters the background, especially when the memory is tight, everything becomes unreliable].

 

6,Uipasteboard + URL Scheme

The above solutions may be enough to meet your application needs, but these solutions have some obvious shortcomings, leaving room for another potential solution. If you want to precisely control the data communication between apps without the influence of offline, you can choose uipasteboard + URL scheme solution. [This solution is used for ipgmail applications that follow the X-callback-URL specifications]

Like the URL scheme mentioned above, weApplications can communicate with each other through URLs. for data transmission, clipboard can be used.You can choose a mature Data Structure serialization deserialization solution to encapsulate communication and data transmission protocols, and define the callback method.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.