I need to know my deployment target in my unit test cases. Is there any way to get the iOS deployment target programmatically (using Objective-C)?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
This is available as an Xcode build variable called
IPHONEOS_DEPLOYMENT_TARGET
.All you need to do is create a preprocessor macro holding that value:
and then you can refer to
AMIT_DEPLOYMENT_TARGET
in your code. (Note: this is afloat
, rather than the string you might expect.)Displays as a 'big' int:
e.g. for iOS 5.1 as the deployment target