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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:36:02+00:00 2026-05-25T11:36:02+00:00

I need a little help… i’m trying to use the apptrackr API ( API

  • 0

I need a little help… i’m trying to use the apptrackr API (API Apptrackr – You must be registred
)
with my iPhone application but without success. I have some php example code that works fine with the API but i don’t know how to do that with objective-c. I already do some test but i really don’t know where i’m wrong!

That’s the PHP code:

<?php
 $request = array('object' => 'Link',
    'action' => 'get',
    'args' =>  array(
                     'all_version' => true,
                     'app_id' => 284972998
                     )
 );


// Wrap the request and JSON encode it.
$wrapper = array(
       'request' => json_encode($request)
);


// JSON and URLencode the wrapper.
$wrapper = urlencode(json_encode($wrapper));

// Now, using the cURL extension, we perform the API request.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://api.apptrackr.org/');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "request=$wrapper");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);

// print the output
print_r($data);

?>

and that’s my objective-c code:

NSMutableDictionary *arg = [NSMutableDictionary dictionary];
[arg setObject:[NSNumber numberWithBool:YES] forKey:@"all_versions"];
[arg setObject:[NSNumber numberWithInt:284972998] forKey:@"app_id"];

NSMutableDictionary *requestDictionary = [NSMutableDictionary dictionary];
[requestDictionary setObject:@"Link" forKey:@"object"];
[requestDictionary setObject:@"get" forKey:@"action"];
[requestDictionary setObject:arg forKey:@"args"];

NSString *jsonString = [requestDict JSONRepresentation];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://api.apptrackr.org"]];
[request setHTTPMethod:@"POST"];
[request setValue:jsonString forHTTPHeaderField:@"request"];

NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self];

-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{
    NSString *recivedSTR = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
    NSLog(@"RecivedData: %@", recivedSTR);
}

I hope someone can help me! For now thanks a lot!
PS: Sorry for my bad english

  • 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-05-25T11:36:02+00:00Added an answer on May 25, 2026 at 11:36 am

    I guess you shouldn’t put your jsonString in the HTTP header field, but in the POST Body of your request.

    Try this:

    [request setHTTPBody:[NSString stringWithFormat:@"request=%@",jsonString]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a little help on this subject. I have a Web application written
hy, i need a little help here: i use SWFupload to upload images! in
I need a little help. I'm trying to make a little project in MVC
I need a little help.I'm using a ViewFlipper to change views in TabActivity but
I'm so close on this one, but I need a little help. I have
Need a little help here. I'm new to Coldfusion and I use CF6. I
I need a little help with (probably) something really simple. I want to use
I need a little help. I'm trying to put together a small Java program
I need a little help with php. I'm trying to include different menus for
Need a little help with a regex I'm trying to match a string that

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.