©Tangram 0.9.8 - App Store link to the full version/reviews (before even submit the application)
Update: This post is really great indeed, but since than I've found out a far more simple method. You should set up a new Application anytime in iTunesConnect without even submit the actual binary, and an App ID will immediately assigned to it. After that you can use it to compose the links described below (or here - Dissecting iTunes links - at bjango.com). So you can place simple static URL calls after this in your App.
| Non-paid advertisement, worth to click on. |
![]() |
As I created some buttons to refer to App Store links (link to the full version, link to review the application) I realized that the links I want to open just don't exist yet.
This is something like the chicken-egg problem. I want to refer from the application to something that is connected to the same application, but it has not submitted yet (so it don't have Apple ID), so there is not such a URL.
As I roughly browsed trough some forums on this issue I found a suggestion that says we should simply create a redirection page that we can change later without resubmit our application binary.
So it could be solve with a simple openURL: call that point to an empty HTML with a redirection META tag in its header. This could be result in a bad user experience as it would open up safari first, then the URL bar would show weird unrelevant links, then finally it would switch to the App Store application.
A more elegant way to solve this to set up a server-side script (a really small PHP file here) we can ask about the current URL. So pressing our button will ask this PHP file about the URL, then after it returned with the link, we simply open it with one openURL: call.
Another important thing is to format the returned URL as an iPhone compatible App Store link that won't open up Safari. See Ben Gottlieb's answer on releated question at stackoverflow.
So the xCode lines below.
//Get the remote URL when tapped the button. -(IBAction)beginProcess:(id)sender; { //Compose request. NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.compactapps.eu/iTunesPage.php"]]]; //Invoke. NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES]; } //The delegate method of NSURLConnection. -(void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse*)response { //Simply open the received redirection URL. [[UIApplication sharedApplication] openURL:[response URL]]; }
Tapping the button starts an NSURLConnection request that points to our previously composed redirecting script. The PHP part is really a single line of code (this is what we call at the http://www.compactapps.eu/iTunesPage.php request, so it has to be uploaded there).
<?php header("Location: http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=384527808&mt=8"); ?>
It is redirecting to the application link in the mentioned iPhone-proof format, so the application will receive a response with a redirection URL that can be simply opened with the openURL: call.
So you set up this architect, then after the application has submitted, simply swap the Apple ID in the redirection link, and done.
The direct link to the review section is just the same, except the URL have to follow the format described at a bjango.com article for example: Dissecting iTunes links.
Comments 
Not commented yet.
Say something
HTML tags not allowed, URL-s underlined automatically. An e-mail is minimum required (it wont appear on the page).If you have a freeblog account, may log in here.
All the things behind
©ompactGames
iPhone game development. Flash (ActionScript), iPhone (xCode, Objective-C, Cocoa-Touch), augmented reality, geometry, user-experience, tangram, sudoku, origami, whatever.
iPhone Apps
- compass3D©- compactTangram©
- TapStack©
All categories
- Archive from old times (hungarian) (10)- compactSudoku© (20)
- compactTangram© (48)
- compass3D© (24)
- Creativity (3)
- gotoandplay.freeblog.hu (2)
- Origami sessions (2)
- Sudoku technikák (3)
- TapStack© (7)
- xCode - augmented reality (28)
- xCode - hasznos linkek (1)
- xCode - iPhone app development (92)
- xCode - OpenGL ES 1.x for iPhone (27)
