开发者

Problems running SDK 3 iPhone App on IOS4

I have made an iPhone app building with SDK 3, expecting it to run on all platfroms of IOS 3 and up.

My app uses location services, and in iPhone 4 IOS one can shut down location services for a specific app. Doing so causes my app to hang indefinitely. I handle the case where location services are disabled in general, but not per app. I couldn't because it is not supported in SDK 3

How can I have my app support IOS4 in this aspect (and unforeseen others) while maintaining compata开发者_高级运维bility with SDK 3?


From Apple's Location Awareness Programming Guide

Determining Whether Location Services Are Available

Every iOS-based device is capable of supporting location services in some form but there are still situations where location services may not be available:

  • The user can disable location services in the Settings application.
  • The user can deny location services for a specific application.
  • The device might be in Airplane mode and unable to power up the necessary hardware.

For these reasons, it is recommended that you always call the locationServicesEnabled class method of CLLocationManager before attempting to start either the standard or significant-change location services. (In iOS 3.x and earlier, check the value of the locationServicesEnabled property instead.)

It specifically mentions "iOS 3.x and earlier" so I think it should work. Hope it helps.Blockquoted

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜