Sharing info between multiple iOS apps

大城市里の小女人 提交于 2019-12-20 02:55:01

问题


By "legally" I meant methods which will be accepted to App Store.

I have read this one, but I feel that it could be out-date (a question and most answers are dated back 2008)

How to share custom data between iPhone applications?

And these provides minimal info:

Sharing files Between Apps on iOS Devices

Sharing data between different apps in the same iOS device

As I understand these methods are

Completely legal

1) UIApplication openURL

2) Keychain can be used if both applications are developed by the same team

3) iCloud could be used if both application are developed by the same team

Grey area.

4) Global notification using CFNotificationCenterGetDarwinNotifyCenter, CFNotificationCenterAddObserver, CFNotificationCenterPostNotification

5) Use TCP/IP sockets (if one of applications run in background)

6) Use Unix sockets (if one of applications run in background)

7) Use custom UIPasteBoard

Did anybody got rejected or accepted who used this?

Does anybody know any other methods?

-- Update 1--

Both apps will be running on the same device.

There is a chance that one of the apps will be running in the background (VOIP)

Apps will be developed by different teams (won't be signed with the same certificates).


回答1:


i would recommend using icloud because apple sends the files to all devices, and you can get the files in both apps using it. if you want to do it with someone elses apps, you would have to ask that developer. but icloud is probably the easiest and fastest way.




回答2:


What about using a service like dropbox? It's used by quite a lot of apps, and I think they provide a rich API.



来源:https://stackoverflow.com/questions/14530043/sharing-info-between-multiple-ios-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!