[AC-2288] ARC plugin compilation fails with 'error: overriding method has mismatched ns_returns_not_retained attributes'
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-04-28T15:53:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | bug |
Reporter | Peter Steinberger |
Assignee | Shak Hossain |
Created | 2013-03-07T18:23:37.000+0000 |
Updated | 2016-03-08T07:41:17.000+0000 |
Description
Compilation of my plugin fails here. This is a regression from 3.0.0, where everything worked.
In file included from /Users/steipete/Documents/Projects/PSPDFKit/Titanium/Classes/TIPSPDFViewControllerProxy.m:8:
In file included from /Users/steipete/Documents/Projects/PSPDFKit/Titanium/Classes/TIPSPDFViewControllerProxy.h:9:
In file included from /Users/steipete/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/iphone/include/TiModule.h:8:
In file included from /Users/steipete/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/iphone/include/TiUtils.h:26:
/Users/steipete/Library/Application Support/Titanium/mobilesdk/osx/3.0.2.GA/iphone/include/TiBuffer.h:28:1: error: overriding method has mismatched ns_returns_not_retained attributes
-(NSNumber*)copy:(id)args NS_RETURNS_NOT_RETAINED;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder.h:50:1: note: method declared here
- (void)copy:(id)sender NS_AVAILABLE_IOS(3_0);
^
1 error generated.
I suggest changing the custom copy: to something prefixed, or removing the NS_RETURNS_NOT_RETAINED to fix this issue.
The PSPDFKit Titanium plugin uses ARC, seems I'm pretty much the first one to use ARC so I run into all kinds of problems :/
Removing the NS_RETURNS_NOT_RETAINED works and I'm able to compile again - but it doesn't seem like a good idea. Please properly fix this. (I can provide you with the PSPDFKit sources to test this if you keep them private)
Any idea when this issue will be resolved. Been having problems compiling modules with this error. Stuck using older versions of the SDK and having to do several different work arounds.
We do not currently support ARC.
This issue has been resolved with 3.1.0 release.