0

If you use AppCode, I'm sure you've seen this or similar in your code...

Method XYZ is not available for deployment target 6.1 in 'Project ABC'

Enum Constant XYZ is not available for deployment target 7.0 in 'Project ABC'

But yet the project still builds fine and runs as expected... so what exactly does AppCode mean by these messages when they clearly aren't true, given the fact the project runs perfectly while utilizing the features of the supposed unavailable methods, enums, etc.

enter image description here

Community
  • 1
  • 1
Logicsaurus Rex
  • 3,172
  • 2
  • 18
  • 27

1 Answers1

1

It looks like you have Deployment Target set to 6.1 in the Project settings, and authorizationStatusForMediaType is available starting from 7.0 version. Same for other similar cases.

  • Yes, I do understand that, but if it's truly not available, then the project should either fail to build when it hits that code, or fail to run when it hits that code, and neither is the case, whether it be an enum, a method, a property, etc. Everything works fine. So what's the point of the message when the app still runs as expected? – Logicsaurus Rex Jan 12 '17 at 16:16
  • No, you project won't fail to compile, because you also have a Base SDK which specifies the newest SDK version your app can run on. And deployment target is the oldest SDK version you, say, think that your app will run on. Here https://www.raywenderlich.com/42591/supporting-multiple-ios-versions-and-devices you can find a good explanation. – Stanislav Dombrovsky Jan 12 '17 at 19:39