Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8865857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:37:48+00:00 2026-06-14T16:37:48+00:00

I’ve built the Google Data APIs Objective-C Client Library and have it linking and

  • 0

I’ve built the Google Data APIs Objective-C Client Library and have it linking and working with my application (incl. GTMOAuth2) and can pull data back. I need to work with the Provisioning API (still XML-only) so am building out the additions I need within my own application. I think I have finally figured out how all of this works and I’m very close to reading custom elements, but I’m missing something.

I’ve subclassed GDataServiceGoogle, GDataEntryBase, and GDataFeedBase and am getting correct data back. I’m starting with a simple & straightforward element type: quota. In the Users feed, the quota element looks like this:

<apps:quota limit="2048"/>

So, I’ve added the following value construct:

@interface GDataQuotaProperty : GDataValueConstruct <GDataExtension>
+ (NSString *)extensionElementURI;
+ (NSString *)extensionElementPrefix;
+ (NSString *)extensionElementLocalName;
@end

@implementation GDataQuotaProperty
+ (NSString *)extensionElementURI       { return kGDataNamespaceGApps; }
+ (NSString *)extensionElementPrefix    { return kGDataNamespaceGAppsPrefix; }
+ (NSString *)extensionElementLocalName { return @"quota"; }
@end

And I’ve added the following methods to my GDataEntryBase subclass:

- (GDataQuotaProperty *)quota;
- (void)setQuota:(GDataQuotaProperty *)val;

Implemented as follows:

- (GDataQuotaProperty *)quota {
    return [self objectForExtensionClass:[GDataQuotaProperty class]];
}

- (void)setQuota:(GDataQuotaProperty *)val {
    [self setObject:val forExtensionClass:[GDataQuotaProperty class]];
}

As documented in the comments in GDataObject.h (and I’ve been working off of GDataServiceGoogleCalendar, GDataEntryCalendar, and GDataFeedCalendar as a reference implementation), in my GDataBaseEntry subclass I’ve implemented addExtensionDeclarations as follows:

- (void)addExtensionDeclarations {
    [super addExtensionDeclarations];

    Class entryClass = [self class];

    // User extensions
    [self addExtensionDeclarationForParentClass:entryClass
                                   childClasses:[GDataQuotaProperty class], nil];
}

However, when I try to call the quota method as follows in my callback:

GDataTextConstruct *titleTextConstruct = [user title];
NSString *title = [titleTextConstruct stringValue];
GDataQuotaProperty *quotaConstruct = [user quota];
NSString *quota = [quotaConstruct stringValue];

I get an exception and this error:

2012-11-19 12:42:22.667 Google Apps Open Directory Sync[47679:903] -[GDataEntryBase quota]: unrecognized selector sent to instance 0x2836d0

In the above example I do get the user’s name (the element’s title) back correctly without error. Also, the user object is actually of the type of my GDataEntryBase subclass, not GDataEntryBase itself (verified in the debugger), plus the classForEntries method in my GDataFeedBase subclass correctly returns the class of my subclass of GDataEntryBase) so between the two of those it really has to be the correct class. I have a breakpoint on my GDataEntryBase subclass’s quota method which is never being tripped, so what am I missing here?

As mentioned, I’ve been comparing with the Service/Feed/Entry implementation for Calendar (specifically the accessLevel & color elements and methods) and am just not seeing what I’m missing.

Thanks in advance for any assistance you can provide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:37:50+00:00Added an answer on June 14, 2026 at 4:37 pm

    While I had implemented the classForEntries method in my GDataFeedBase subclass and was correctly returning the class of my GDataEntryBase subclass from it, as follows:

    - (Class)classForEntries {
        return [GDataEntryUser class];
    }
    

    I had missed the implementation of standardKindAttributeValue in the same GDataFeedBase subclass, which should’ve been returning the appropriate category schema URL (“http://schemas.google.com/apps/2006#user” in the case of Google Provisioning API User feeds). So, I implemented as follows (although I actually use a constant):

    + (NSString *)standardKindAttributeValue {
        return @"http://schemas.google.com/apps/2006#user";
    }
    

    Once addExtensionDeclarations, classForEntries, and standardKindAttributeValue were all implemented correctly, GDataEntryBase was able to correctly determine that my subclass should be used for the objects in the feed and so my selectors were recognized.

    Many thanks to Greg Robbins of Google for pointing me in the right direction in this thread on the Google Data APIs Objective-C Client Libraries discussion group.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.