So, you ever wondered how to get your iPhone “Lite” app to trigger the App Store to load the full version’s page? And you didn’t stumble across QA1629? Well, here’s the quick notes version for you.
Step 1: Copy the URL of your full app from the App Store by right-clicking its name, which will be something like
Step 2: Replace “itunes” with “phobos”. This is so it doesn’t start Safari.
Step 3: Have the system load it.
NSString *iTunesLink = @"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=306469222&mt=8";
Ah, but what if you want to use your iTunes affiliate account? After all, no point leaving 5% off the table! Well, that’s a trifle more complicated, since there’s redirects involved. So take your big long LinkShare string, change “itunes” to “phobos” as above, and create a NSURLConnection to sort out the URL that actually needs to be loaded. Like this:
NSString *referralLink = @"http://click.linksynergy.com/yadayadayada";
self.iTunesURL = [NSURL URLWithString:referralLink];
NSURLRequest *referralRequest = [NSURLRequest
NSURLConnection *referralConnection = [[NSURLConnection alloc]
// Save the most recent URL in case multiple redirects occur
- (NSURLRequest *)connection:(NSURLConnection *)connection
self.iTunesURL = [response URL];
// No more redirects; use the last URL saved
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
[[UIApplication sharedApplication] openURL:self.iTunesURL];
And that, dear friends, is how you get 75% instead of 70% on your in-app referrals. You’re welcome.
And check out this followup post on how to get individually tracked analytics into your Linkshare links!]
GeoRiot promises to internationalize all your links.Continue Reading →