BluesZhang / 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 Project #122

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?

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 GDataObject.h file, 
saying that “ARC forbids Objective-C objects in structs or unions”, and 
“The current deployment target does not support automated __weak references."

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 711.

Please provide any additional information below.

I have reverted my project so that it no longer uses ARC, and coded 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 21 Nov 2011 at 7:19

GoogleCodeExporter commented 9 years ago
Thanks for pointing out the issue. We've added conditional macros for weak 
pointers in GDataObject.h. Please try updating your sources.

http://code.google.com/p/gdata-objectivec-client/source/detail?r=712

Original comment by grobb...@google.com on 21 Nov 2011 at 11:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for your quick reply,

I updated my sources but am getting the same issue with
GTMGatherInputStream.h.  I wasn't sure what the process was about
commenting on an issue that had been marked fixed, so opened a new one.
Please see the new issue #123.

Original comment by benjamin...@gmail.com on 23 Nov 2011 at 2:39