New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying -DOS_OBJECT_USE_OBJC=0 doesn't take into account developer integrations #1001

Closed
keith opened this Issue Apr 25, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@keith
Member

keith commented Apr 25, 2013

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+

@keith

This comment has been minimized.

Show comment
Hide comment
@keith

keith Apr 25, 2013

Member

Moved from and other discussion https://github.com/CocoaPods/Specs/issues/1730

Member

keith commented Apr 25, 2013

Moved from and other discussion https://github.com/CocoaPods/Specs/issues/1730

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Apr 25, 2013

Member

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.

Member

alloy commented 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

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Apr 26, 2013

Member

FYI, a current workaround would be to have the conditional check the value of OS_OBJECT_USE_OBJC.

/cc @robertjpayne

Member

alloy commented Apr 26, 2013

FYI, a current workaround would be to have the conditional check the value of OS_OBJECT_USE_OBJC.

/cc @robertjpayne

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Dec 6, 2013

Member

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.

Member

alloy commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment