amarzulli / gdata-objectivec-client

Automatically exported from code.google.com/p/gdata-objectivec-client
Other
0 stars 0 forks source link

Library does not work with an ARC (Automatic Reference Counting) enabled (continuation of issue #122) #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a new iOS project with Automatic Reference Counting enabled.

2. Link in the iPhone GData Static Library by following the steps here 
http://code.google.com/p/gdata-objectivec-client/wiki/BuildingTheLibrary, or 
here: 
http://hoishing.wordpress.com/2011/08/23/gdata-objective-c-client-setup-in-xcode
-4/

Set up the GData Library for use with a specific service (In this case Google 
Picasa) by using these "Other C Flags": 
-DGDATA_IPHONE=1 
-DGDATA_REQUIRE_SERVICE_INCLUDES=1 
-DGTM_INCLUDE_OAUTH2=1 
-DGDATA_INCLUDE_PHOTOS_SERVICE=1

What is the expected output? What do you see instead?

This is a continuation of Issue #122, unfortunately the fix that was applied 
did not completely solve the problem.  Since that particular issue has been 
marked as Fixed I decided to open a new Issue.  I am now getting an error with 
the GTMGatherInputStream.h file.

I expect to be able to use the GData classes with ARC enabled on my project.  
Instead the compiler throws an issue specifically with the 
GTMGatherInputStream.h file, saying “The current deployment target does not 
support automated __weak references."

I tried to replace the __weak modifier with GDATA_UNSAFE_UNRETAINED, but was 
unable to get it to work.

Because I have to include the header files in my project, it seems that they 
are being checked by the ARC compiler and it is throwing these errors which 
prevent my application from compiling, even though the actual 
libGDataTouchStaticLib.a is compiled in the seperate GData project which has 
ARC turned off.

What version of the product are you using? On what operating system?

I am using the latest revision of the gdata-objectivec-client, revision 712.

Please provide any additional information below.

I can revert my project so that it no longer uses ARC, and code the appropriate 
releases and autoreleases, but it would be great if I didn't have to do that.

Original issue reported on code.google.com by benjamin...@gmail.com on 23 Nov 2011 at 2:24

GoogleCodeExporter commented 9 years ago
I've removed the __weak declaration modifiers; they're no-ops in non-ARC 
builds, anyway.

http://code.google.com/p/gtm-http-fetcher/source/detail?r=90

Original comment by grobb...@google.com on 23 Nov 2011 at 6:53