-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
CocoaLumberjack 2.0.0-rc does not build with Pods #433
Comments
See the same issue |
Also getting this. See which issue? |
So, according to this: http://stackoverflow.com/questions/8904206/what-property-should-i-use-for-a-dispatch-queue-after-arc they should be objects. But even that my deployment target is iOS 7.0, compiler throws this error. The problem is apparently with CocoaPods's linking system and should add !COCOAPODS to the checking macro. |
I should be on the pre version of CocoaPods (using --pre) and updating CocoaPods every day. |
Alright, if you open #if OS_OBJECT_HAVE_OBJC_SUPPORT
#define DISPATCH_QUEUE_REFERENCE_TYPE strong
#else
#define DISPATCH_QUEUE_REFERENCE_TYPE assign Which line is Xcode syntax highlighting? Also, can you tell us what your SDK and Deployment targets are? |
It's the top one of course, thats where the error is. Using SDK 8.1 and Deployment target 7.0. |
OK after doing some digging I see where the error is. The CLJ podspec specifies the following
According to the Cocoapods docs this causes cocoapods to set If the above podspec settings are correct for CLJ 2.0 then my patch will need to be reverted and the check will have to behave differently under cocoapods. This feels pretty gross to me. I wonder if the check should instead look at Deployment target to pick the correct macro. If CLJ 2.0 requires newer deployment targets then the podspec can be adjusted and this error will go away. |
Same here, pointing to last commit causes the reported error. Are you planning guys to fix it soon? I would love to avoid forking it for my current project! :) |
You'll need to change the check to something like the following. #if OS_OBJECT_HAVE_OBJC_SUPPORT || __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
#define DISPATCH_QUEUE_REFERENCE_TYPE strong
#else
#define DISPATCH_QUEUE_REFERENCE_TYPE assign
#endif If you revert the patch then Cocoapods users using an SDK > 6.0 will get an error. |
@foozmeat and @rivera-ernesto please review #451 |
I believe that will produce the desired result regardless of Cocoapods. |
Fix #433 CocoaLumberjack 2.0.0-rc does not build with Pods
Sadly this does not fix the issue. We build for iOS 7 and up, so this check does not make any difference really. I'd see a better solution to be: #if COCOAPODS for now.. |
I think we need to revert to the original #412 fix then. |
However, on iOS >= 6.0 and OS X >= 10.8 we will have the dispatch_release() behavior. This is because the current podspec specifies a deployment target of iOS 5 and OS X 10.7. One option to get around this is to create two podspecs: |
@Legoless I don't understand why |
Yes, but CocoaPods is setting This is all due to the podspec specifying a deployment target of iOS 5 and OS X 10.7. |
Understood, I posted the exact same information higher up this thread :) That's why I suggested adding a check for the minimum OS required. Take a look at how #ifndef OS_OBJECT_HAVE_OBJC_SUPPORT
#if defined(__OBJC2__) && !defined(__OBJC_GC__) && ( \
__MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8 || \
__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0)
#define OS_OBJECT_HAVE_OBJC_SUPPORT 1
#else
#define OS_OBJECT_HAVE_OBJC_SUPPORT 0
#endif
#endif Checking |
Thanks. I missed your earlier comment. I agree. Should evaluate to the same with or without CocoaPods. However, checking This is at odds with the compiler flag that CocoPods passes in -DOS_OBJECT_USE_OBJC=0. Hence the compile error: property with 'retain (or strong)' attribute must be of object type |
@foozmeat The conditions all go through correctly, but apparently it wont compile GCD properties as strong, even so. So the issue is somewhere else, probably in Pod settings rather. |
Fix #433 CocoaLumberjack 2.0.0-rc does not build with Pods
Please test if #455 fixed this. |
Fixed for me. I tested with OS X 10.7 and 10.10, as well as iOS 5.0 and 8.1. |
Fixed for me, tested with project that has as deployment target iOS 8.0 |
I updated the CocoaLumberjack to 2.0.0-rc from 2.0.0-beta4 and now the project does not build anymore. This are the two errors I get:
Apparently these lines were changed to point to objects. Is there any specific reason that those properties are marked as strong?
The text was updated successfully, but these errors were encountered: