Skip to content
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
Closed
Labels

Comments

@keith
Copy link
Member

@keith 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
Copy link
Member Author

@keith keith commented Apr 25, 2013

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

@alloy
Copy link
Member

@alloy 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
Copy link
Member

@alloy 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
Copy link
Member

@alloy 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants