I found an example in the Clang Compiler User’s Manual that lets me ignore the warning:
if ([fileManager respondsToSelector:@selector(removeItemAtPath:error:)]) {
[fileManager removeItemAtPath:downloadDir error:NULL];
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[fileManager removeFileAtPath:downloadDir handler:nil];
#pragma clang diagnostic pop
}
Related Contents:
- How to print out the method name and line number and conditionally disable NSLog?
- Hidden Features of Xcode
- What is the best way to unit test Objective-C code?
- Xcode build failure “Undefined symbols for architecture x86_64”
- Is there a way to suppress warnings in Xcode?
- Xcode linker error: file too small for architecture x86_64
- How to deprecate a method in Objective-C
- How to view contents of NSDictionary variable in Xcode debugger?
- setValue:forUndefinedKey: this class is not key value coding-compliant for the key [duplicate]
- Objective-C Introspection/Reflection
- Class Foo is implemented in both MyApp and MyAppTestCase. One of the two will be used. Which one is undefined
- Unit Testing of private methods in Xcode
- Send notification to Mountain lion notification center
- @class vs. #import
- @synthesize vs @dynamic, what are the differences?
- How do I iterate over an NSArray?
- How do I use NSTimer?
- How to change time and timezone in iPhone simulator?
- Check that an email address is valid on iOS [duplicate]
- ARC and bridged cast
- Xcode doesn’t show the line that causes a crash
- How to use NSCache
- Xcode keeps asking for password to use the System Keychain
- How to convert An NSInteger to an int?
- ViewController respondsToSelector: message sent to deallocated instance (CRASH)
- Managing multiple asynchronous NSURLConnection connections
- how to hide status bar when splash screen appears in iphone?
- Picking a Random Object in an NSArray
- Compiler error: “initializer element is not a compile-time constant”
- How to get UITableViewCell indexPath from the Cell?
- Declaring and checking/comparing (bitmask-)enums in Objective-C
- Is the project.xcworkspace file important?
- Xcode intellisense meaning of letters in colored boxes like f,T,C,M,P,C,K,# etc
- Difference between Foundation Framework and Core Foundation Framework?
- warning: iPad: Icon-72.png: icon dimensions (0 x 0)
- NSMutableArray – force the array to hold specific object type only
- Workflow to create Xcode groups as file system folders
- Get Current date & time with [NSDate date]
- Xcode’s “Incomplete implementation” warning
- What does Apple mean when they say that a NSManagedObjectContext is owned by the thread or queue that created it?
- Create NSString by repeating another string a given number of times
- Prototype Cells in a nib instead of a storyboard
- How to parse NSString into BOOL in Objective-C?
- Determine if NSNumber is NaN
- Getting the last day of a month
- Is there some literal dictionary or array syntax in Objective-C?
- Why are umbrella frameworks discouraged? [closed]
- How do you schedule a block to run on the next run loop iteration?
- const vs static NSStrings in Objective-C
- Objective C static class variables