build problems

30 views
Skip to first unread message

AppDev2012

unread,
Aug 19, 2012, 9:40:57 PM8/19/12
to gdata-objec...@googlegroups.com
I had a working iPhone app that was accessing the Google Analytics service with the objective-c client. Now, after rebuilding with a new version of XCode, I am having problems and need suggestions on where to look.

The runtime problem occurs when I access methods of a returned GDataBaseFeed. When I call the aggregateGroup method, it now fails when it used to work.

GDataAnalyticsAggregateGroup* aggregate = [(GDataFeedAnalyticsData*)feed aggregateGroup];

2012-08-19 21:27:28.671 myapp[3452:4003] -[GDataFeedBase aggregateGroup]: unrecognized selector sent to instance 0xe665440

When I call [feed description] I do get information:

2012-08-19 21:27:28.515 myapp[3452:707] GDataFeedBase 0xe665440: {entries:32 title:Google Analytics Data for Profile XXXXXXXX updated:2012-08-20T01:27:28Z authors:1 links:self id:https://www.googleapis.com/analytics/v2.4/data?ids=ga:XXXXXXXX&dimensions=ga:date&metrics=ga:visits&start-date=2012-07-19&end-date=2012-08-19&start-index=1&max-results=1000 unparsed:<dxp:aggregates>,<dxp:containsSampledData>,<dxp:dataSource>,<dxp:endDate>,<dxp:startDate>}

There is data in the feed evidenced by the 32 entries. Oddly the description mentions "unparsed." Is that my problem? If so how do I fix it.

Thanks

XCode 4.4, Mountain Lion 10.8

Greg Robbins

unread,
Aug 20, 2012, 9:53:12 PM8/20/12
to gdata-objec...@googlegroups.com
When the library creates an instance of GDataFeedBase, it means there is no feed class compiled into the application that matches the XML returned by the server. The library uses a feed's "kind" attribute or category to match the returned XML to the compiled classes. 

Casting a GDataFeedBase instance to the desired class won't work, since it was still the base class that was instantiated.

Incidentally, it would be worthwhile to revise your application to use the JSON Analytics API and the new API library, https://code.google.com/p/google-api-objectivec-client/

Reply all
Reply to author
Forward
0 new messages