Making a free version of your app: Linking to the AppStore

I’m currently creating a free version of an exising app (already for sale on the AppStore).

The free version will include a link to the full version on the AppStore

What is the best way to link to the AppStore from a Corona app? If I use a standard http: request to the AppStore URL, does that necessitate the extra step of opening Safari on the device, and then opening the AppStore? Is there a better way to go directly to the AppStore, bypassing the intermediate step of opening Safari?

[import]uid: 40285 topic_id: 11438 reply_id: 311438[/import]

FYI – I found the answer to this question on StackOverflow. It looks like the solution is to use the protocol “itms” rather than “http”.

“A tip is to use itms:// instead of http://, then it’ll open in the app store directly. On the iPhone, it will make 2 (!) redirects when using http, and 1 when using itms.”

http://stackoverflow.com/questions/433907/how-to-link-to-apps-on-the-app-store [import]uid: 40285 topic_id: 11438 reply_id: 41687[/import]

Just to continue this thread, on Android, you use:

system.openURL(“market://details?id=com.name.games.yourgamename”); [import]uid: 14218 topic_id: 11438 reply_id: 41698[/import]

You could additionally try to access the respective market directly to avoid one page switch. In my apps I’m using (use at your own risk :)):

function self:showReviewPage()  
 local countryCode = system.getPreference('locale', 'country') -- e.g. 'us'  
 local appUrl = 'itms://itunes.apple.com/' .. countryCode .. '/app/' .. misc.toName(app.title) .. '/id' .. app.id  
 system.openURL(appUrl)  
end  

In above you probably want to name the function “showAppPage()” and replace app.id and app.title with respective parameters. For my uses, I’m using this to show the review page of the app that’s currently in use. (Also, ensure that the app in question is indeed available in all markets, and not geo-restricted by any chance.) [import]uid: 10284 topic_id: 11438 reply_id: 42640[/import]

I’m still a little confused by all this. I have a button that I would like to open the app store on an iphone to a specific app. I am using the code below, but I can’t tell on the simulator if it will work or not. ( It goes to grey, spins, and then comes back to the running app usually. ) Can someone explain to me how I can check if it will work?

Thank you!
function button5:tap( event )
media.stopSound()
native.showWebPopup( “http://itunes.com/apps/ask-some-zombies”)
end [import]uid: 63102 topic_id: 11438 reply_id: 45705[/import]

Rjd, do you have an iPhone or iPad for testing? I think it’s an important part of the testing? (Not just for the things which will run differently in the simulator, e.g. in-app payments, keyboard usage, opening app store links…) [import]uid: 10284 topic_id: 11438 reply_id: 45706[/import]

I have an iphone, and I have registered it with the developer center, but haven’t yet figured out how to get an app on it without uploading it to apple, getting it approved, and then paying to get it! Do you know where i can find simple instructions on this process?

Thanks. [import]uid: 63102 topic_id: 11438 reply_id: 45711[/import]

OK, I figured out how to get it to my iphone for testing. Now I know that code doesnt work. SO, can any one tell me what code to use?

Thanks.

RJD [import]uid: 63102 topic_id: 11438 reply_id: 45720[/import]

I just submitted the lite version of my app. Here’s the exact code I used…

local buyit = display.newImage ("linkButton.png")  
buyit.x = 130  
buyit.y = 410  
buyit.xScale = 1.3  
buyit.yScale = 1.3  
localGroup:insert(buyit)  
  
local function buymee(event)  
  
system.openURL( "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=445521008&mt=8" )  
  
end  
  
buyit:addEventListener("touch", buymee)  

the only thing you should have to change is the .png for your button, and the app id in the URL.

445521008 is my app id. You can leave if it you want to! :wink: [import]uid: 18951 topic_id: 11438 reply_id: 45723[/import]

Forgot, you might also want to change the location and the scale :slight_smile: [import]uid: 18951 topic_id: 11438 reply_id: 45724[/import]

Thanks! I already had the button part working, but it was the link that just wasn’t working. But now it does when I changed it to the system.openURL and the URL you suggested with my app ID in it. That was a big help. In the end, my function looks like this…
function button4:tap( event )
media.stopSound()
system.openURL( “itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=440781323&mt=8” )
end [import]uid: 63102 topic_id: 11438 reply_id: 45726[/import]

@rjd_productions
How do you test that this (or the http version) will work while you are still in ad-hoc disti but have already added the app to iTunes Connect and have the 9-digit app ID? is it possible?
thanks, Luciane [import]uid: 32063 topic_id: 11438 reply_id: 84063[/import]

i use system.openURL("http://itunes.apple.com/app/id483332278?mt=8)

Luciane, you can’t test it if it’s not live. there has to be a page on itunes with the app for this to work. if there’s one, it always works. you don’t really have to test.
[import]uid: 6459 topic_id: 11438 reply_id: 84095[/import]

@tetu, I also wanted to know the answer to the question Luciane posted above.

So… if my app’s Apple ID is 123456789 (which would be assigned to my app in iTunes Connect), would I use this: system.openURL("http://itunes.apple.com/app/id123456789?mt=8)

And there would be no need to test the URL because it will always work?

Thank you for all your help.

Naomi [import]uid: 67217 topic_id: 11438 reply_id: 84114[/import]

yes Naomi, it will always work as long as the status of the application is “ready for sale”

copy the above address to a browser. if there’s an application with ID=123456789 then you will be redirected to its page on iTunes, if not you will get a message telling you that this item is not available in the Store of your country
[import]uid: 6459 topic_id: 11438 reply_id: 84192[/import]

@tetu, thank you!

Naomi [import]uid: 67217 topic_id: 11438 reply_id: 84236[/import]

@Tetu
are we not supposed to use the phobos or itms link version so that we go straight to the app store without passing through safari first?
thanks, Luciane [import]uid: 32063 topic_id: 11438 reply_id: 84237[/import]

Luciane, i haven’t tried those, but http works just fine. it gets you to the right place on the store

[import]uid: 6459 topic_id: 11438 reply_id: 84273[/import]

Id like some help of you (ALL) because this thread could be very usefull to other people.

I understand exactly how to link in a app in appstore.

But How can I link to ALL my app?

According to this site:

http://bjango.com/articles/ituneslinks/

I need to link to: http://itunes.com/apps/developer — Search for all apps by developer

But I cannot do this works. Anyone knows?

Thanks and sorry about my english…

Drago [import]uid: 9133 topic_id: 11438 reply_id: 100699[/import]

>>I need to link to: http://itunes.com/apps/developer — Search for all apps by developer<<

Just tried that and it works.
The only caveat is that if your developer name contains spaces or punctuation, you need to omit that.
Mine is Ursa Software, and this link works fine:
http://itunes.com/apps/UrsaSoftware

What happens for you? [import]uid: 108660 topic_id: 11438 reply_id: 100728[/import]