Closed
Description
Right now cocoapods applies the -DOS_OBJECT_USE_OBJC=0 flag to any pod's that are installed with a deployment target under iOS 6.0.
Lets take into account a cocoapod that has a deployment target of iOS 5.0 but has integrated in target conditionals to support iOS 6.0 deployment without warnings/errors on GCD objects:
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0
@property (nonatomic, assign) dispatch_queue_t animationQueue;
@property (nonatomic, assign) dispatch_semaphore_t animationSemaphore;
#else
@property (nonatomic, strong) dispatch_queue_t animationQueue;
@property (nonatomic, strong) dispatch_semaphore_t animationSemaphore;
#endif
Cocoapods will still apply the compiler flag and disable the developers efforts to check and supply this.
The only way I seem to be able to work around this is to remove my developer conditionals integration on the dispatch objects or create a separate podspec for iOS 6.0+
Activity
keith commentedon Apr 25, 2013
Moved from and other discussion https://github.com/CocoaPods/Specs/issues/1730
alloy commentedon Apr 25, 2013
Unfortunately I don’t see a better way than to add an attribute that allows you to explicitly enable/disable it, while defaulting to the current behaviour.
alloy commentedon Apr 26, 2013
FYI, a current workaround would be to have the conditional check the value of
OS_OBJECT_USE_OBJC
./cc @robertjpayne
Merge pull request CocoaPods#1001 from nevyn/spsuccinct
alloy commentedon Dec 6, 2013
Did not realise this was still open, my bad. As outlined in https://github.com/CocoaPods/Specs/issues/4323, lib authors should use the
OS_OBJECT_USE_OBJC
flag instead of doing their own checks. Feature detection is always a better solution over version checking.Leak fixed if worked with cocoapods.