1

Apple's documentation clearly states that DISPATCH_QUEUE_PRIORITY_BACKGROUND is only available in iOS 5 or later. What is the correct way to check if it's available in the runtime environment?

codeperson
  • 8,010
  • 4
  • 31
  • 50

2 Answers2

4

If you are building against iOS 5 SDK or later, it is safe to simply call dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0) and check for a non-NULL return value.

das
  • 3,601
  • 16
  • 19
0

Check the version of the OS and see if it is greater or equal to 5

Community
  • 1
  • 1
borrrden
  • 32,952
  • 8
  • 73
  • 109