Retrieve Information from another App
I'm not sure if this is possible, but if I wanted to say get the weather from the weather ip开发者_如何转开发hone app that comes default with every device, how would I do that? IS it even possible? I don't want to display the information I just want to use it.
The only information I need is if it is raining, snowing, cloudy, or sunny.
Apple actively discourages sharing of data between iOS apps. In fact, Section 2.6 of the current App Store Review Guidelines reads, "Apps that read or write data outside its designated container area will be rejected." App interoperability is not supported, and even if you found a workaround, it would get your app rejected if you're attempting to publish it.
Your best bet is definitely retrieving the data you need from an outside server rather than attempting to interoperate with other apps.
I believe there is no direct API available from SDK. You should rely on external services that provide weather info.
If that addresses your problem, then this Integrating weather information in iphone exactly does that.
No, you can't get arbitrary information from arbitrary apps. In fact, it's somewhat difficult even to share data between apps intentionally. If you want weather information, you'll want to use one of the many APIs available to do this.
精彩评论