0

I'm not sure if this is possible, but if I wanted to say get the weather from the weather iphone 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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Jonathan
  • 2,623
  • 3
  • 23
  • 38

3 Answers3

3

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.

UtopiaLtd
  • 2,520
  • 1
  • 30
  • 46
1

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.

Community
  • 1
  • 1
Tatvamasi
  • 2,537
  • 19
  • 14
0

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.

Chuck
  • 234,037
  • 30
  • 302
  • 389
  • I'm new to this type of information usage. Would the APIs you suggested work with the iphone iOS? How would I even intergrate it? – Jonathan Jul 03 '11 at 21:46
  • @Jon: Yes, they work on any OS that can make requests to the Web. The API docs tell you about the requests you need to make and the formats they use to send the info back. Most APIs will use XML or JSON to return the data to you. – Chuck Jul 03 '11 at 21:58
  • I cannot use weather.com because I just read that you cannot use it for commercial use so, yahoo/weather says that I would need to specify the location. Would I just use the location services provided with the iOS, then retrieve the weather? Again, this is completely new to me and I have never used the location services. Honestly, I just need to know if it's raining, snowing, or cloudy... – Jonathan Jul 03 '11 at 22:06