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

  • SEARCH
  • Home
  • 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 8637559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:30:28+00:00 2026-06-12T10:30:28+00:00

My question may be naive, I guess, since object description is usually used for

  • 0

My question may be naive, I guess, since object description is usually used for debug and output in NSLog. I also have to admit that my approach of attempting use object.description may be wrong. However, I did find in my case, information in description is just what I need. If I can fetch out the part easily from the description.

Okay, here is my code and what I need is user first name (not username):

    self.facebookAccountStore = [[ACAccountStore alloc] init];

    ACAccountType* facebookAccountType = [self.facebookAccountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
    //[self.facebookAccountStore requestAccessToAccountsWithType:facebookAccountType withCompletionHandler:^(BOOL granted, NSError* e) {
    [self.facebookAccountStore requestAccessToAccountsWithType:facebookAccountType options:facebookOptions completion:^(BOOL granted, NSError* e) {
        if (granted) {
            NSArray* accounts = [self.facebookAccountStore accountsWithAccountType:facebookAccountType];
            self.facebookAccount = [accounts lastObject];
            NSLog(@"acct description: %@", self.facebookAccount.description);

            NSLog(@"acct type: %@", self.facebookAccount.accountType);
            NSLog(@"acct credential: %@", self.facebookAccount.credential);
            NSLog(@"acct identifier: %@", self.facebookAccount.identifier);
            NSLog(@"acct username: %@", self.facebookAccount.username);
        } else { //.....
        }

account description gives out:

     acct description: 
     objectID: x-coredata://F8123001-FB33-48D4-B1A7-EXXXX1243XXXX/Account/p10
     enabledDataclasses: {(
         "com.apple.Dataclass.Contacts",
         "com.apple.Dataclass.Calendars"
     )}
     enableAndSyncableDataclasses: {(
     )}
     properties: {
         fullname = "LOOKAT HERE";
         uid = 100004223213342323;
     }
     parentAccount: (null)
     owningBundleID:(null)


     type:com.apple.facebook
     identifier: EF34399A-8577-459B-BE5E-FD12132SEDSFE
     accountDescription: Facebook
     username: pspped.ok@mailserver.com

check out this part:
properties: {
fullname = “LOOKAT HERE”;
uid = 100004223213342323;
}

This is exactly what I need. If I use this, I don’t have to do SLRequest and SLRequestMethodGET etc to get user name (which I didn’t figure out yet, another motivation why I am attempted to use object description).

My question is whether it’s wrong to parse description and get out fullname property? If wrong, why?
Following question is: Wrong or not, how can I get fullname property of description gracefully (such as convert description to something that uses dot and dot to get property, not to chop the string and get that fullname part), because account.description.fullname or account.fullname so doesn’t work although account.username works.

Thanks for your time/input.

  • 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-12T10:30:30+00:00Added an answer on June 12, 2026 at 10:30 am

    It is wrong to parse the description. It’s wrong because the description has no documented format. It may change arbitrarily from one instance of an object to the next and from one version of the OS to the next. So your code is likely to break. By relying on undocumented behaviour you’re also in breach of your iOS Developer Programme agreement with Apple, giving them the right to pull your apps at any time.

    Furthermore if for some reason you’re absolute desperate to use undocumented API then you might as well use [self.facebookAccount.description valueForKey:@"fullName"]; it’ll be just as robust to OS changes without you trying to second guess how Core Data object descriptions are output.

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

Sidebar

Related Questions

I have a question that may be quite naive, but I feel the need
this may be a naive question, but, as asked in the object, what is
This question may be naive, but: is there const keyword in C? since which
This question may seem naive. I don't want to reach the power of this
I am quite new to COM so the question may seem naive. Q1. About
This question may seem a little bit stackoverflow-implementation specific, but I have seen a
The question may sound a bit naive or stupid, but i was wondering...will POST
This may be a pretty naive and stupid question, but I'm going to ask
It may looks a naive question but I am wondering about the relationship between
This may be a terribly naive question but I was just wondering if the

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.