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 8568545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:08:11+00:00 2026-06-11T18:08:11+00:00

First, + (void)allOpenRequestsWithBlock:(void (^)(NSArray *requests, NSError *error))block Can someone give an in depth explanation

  • 0

First,

 + (void)allOpenRequestsWithBlock:(void (^)(NSArray *requests, NSError *error))block 

Can someone give an in depth explanation what the semantics of this method is?
What is the plus sign vs minus.
Can someone explain (void (^)(NSArray *requests, NSError *error))block?
It’s a void block that retains requests and errors?

This line of code:

 [[AFChangeRequestAPIClient sharedClient] getPath:@"example.json" parameters:[NSDictionary      dictionaryWithObject:@"false" forKey:@"include_entities"] success:^(AFHTTPRequestOperation *operation, id JSON) 

Is this calling the get Path Method that has parameters above? THe Dictionary is passed with just 1 key/value of include_entities/false? What does the success block part mean? Is it the return value?

I am basically trying to understand the AFNetworking framework and it seems to use syntax that I am not familiar with.

Thanks!
Alan

  • 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-11T18:08:13+00:00Added an answer on June 11, 2026 at 6:08 pm

    This is a very vast question. You shouldn’t expect to learn a language simply by example, and should read the Introduction to Objective-C Language in Apple’s documentation first before going further. By asking the question you seem to try to understand everything at the same time whereas you don’t seem to know the basics of the language itself, and this is not the good approach to learn a language.

    To answer your question anyway:

    • The + sign means it is a class method. The - sign means it is an instance method.
    • The semantic of a method is - (returntype)methodName:(type1)param1 nameContinuation:(type2)param2 ; where the - here thus means it is an instance method, the return type is returntype, the method has the name methodName:nameContinuation: and has two parameters, one of type type1 identified by the variable param1 and one of the type type2 identified with the variable param2
    • In the + (void)allOpenRequestsWithBlock:(void (^)(NSArray *requests, NSError *error))block
      synthax, then, void(^)(NSArray* requests, NSError* error) is the type of the first parameter. This type describes an Objective-C block, which is something quite similar to a function pointer but that allows closure (and variable capture). For more info about blocks, again, read the dedicated Apple documentation.

    For the second question, the method call is not complete and miss the block body.

    [[AFChangeRequestAPIClient sharedClient] getPath:@"example.json"
                                          parameters:[NSDictionary dictionaryWithObject:@"false" forKey:@"include_entities"]
                                             success:^(AFHTTPRequestOperation *operation, id JSON)
     {
       /* block body here */
     }];
    

    This calls the method getPath:parameters:success: on the object returned by [AFChangeRequestAPIClient sharedClient] (so this is not AT ALL the same method as above). This method is passed three parameters, the first one being @"example.json", the second one being an NSDictionary containing only one key/value pair, and the last one being a Objetive-C block. This block takes two parameters of type AFHTTPRequestOperation and id respectively.

    Again, it really seems that you try to learn stuff too fast and use advanced stuffs (like blocks and their syntax) before understanding the basics (like instance vs. class methods, the basic language syntax of a method, etc). Take your time to learn stuff, you don’t build a house in one day, and more important you build the foundation before the roof 😉

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

Sidebar

Related Questions

I have this code that we can write in two ways First Way void
First look at this code: class Program { static void Main(string[] args) { var
Code goes first: void foo(int x) { void bar(int); //is this forward-decl legal? bar(x);
I have this code: class Class { public: virtual void first() {}; virtual void
On PostBack, from clicking on an ImageButton, it first hits protected void Page_Load(object sender,
void say(char msg[]) { // using pointer to print out the first char of
In my first approach with Rails I have simply create a void SayController and
Imagine I have a method: void Method(bool parameter){ if(parameter){ // first case } else
public void Save() { XmlSerializer Serializer = new XmlSerializer(typeof(DatabaseInformation)); /* A first chance exception
I've just used it for the first time - consider: IGameObject void Update() IDrawableGameObject

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.