Search Unity

link to app on appstore from in an other app

Discussion in 'iOS and tvOS' started by lesfundi, Sep 26, 2009.

  1. lesfundi

    lesfundi

    Joined:
    Jan 10, 2009
    Posts:
    628
    i want to create a link my current app so when you click on a button
    it open the appstore (on the iPhone) and goes directly to the application.
    Can you do that in the basic uinty iphone version?
     
  2. lesfundi

    lesfundi

    Joined:
    Jan 10, 2009
    Posts:
    628
    Application.OpenUrl("http://www.itunes.com/appname")
     
  3. lesfundi

    lesfundi

    Joined:
    Jan 10, 2009
    Posts:
    628
    that doesn't work :-(
    i also copy the weblink from the app in the store in to this but that doesn't work too
     
  4. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    I'm afraid you can only open a URL in iPhone Advanced.
     
  5. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    Negative. As of the latest patch, OpenURL is available for both licenses. I don't know how to link to an app in the app store, but if you figure out how to get that URL, then Application.OpenURL will work for you.
     
  6. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Yup, this is true as of Unity iPhone 1.5.

    @lesfundi: make sure you've updated to v1.5 and that all works well in the editor, then test again on the device. Also, make sure you're using the correct URL, like "http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=<your app number here>&mt=8".
     
  7. lesfundi

    lesfundi

    Joined:
    Jan 10, 2009
    Posts:
    628
    thx, i will give that a try later on.
     
  8. jtbentley

    jtbentley

    Joined:
    Jun 30, 2009
    Posts:
    1,397
    I use it in about 5 apps, I'm pretty sure it works fine :)
     
  9. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    isn't it imtp:// or alike instead of http to open the appstore directly?
     
  10. RobbieDingo

    RobbieDingo

    Joined:
    Jun 2, 2008
    Posts:
    484
    Try Url with capitals:

    Application.OpenURL("http://www.itunes.com/appname")

    Works OK for me...
     
  11. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    734
    damn i was wrong - doesn't work , one has to use "http://"
     
  12. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    is it possible to use itmp:// or marketplace:// directly or must you use http://
     
  13. AjayKhara

    AjayKhara

    Joined:
    Jul 10, 2013
    Posts:
    4
    Hey, I'm probably a bit late to the party, here's how you do it.
    1. #if UNITY_ANDROID
    2. Application.OpenURL("market://details?id=YOUR_ID");
    3. #elif UNITY_IPHONE
    4. Application.OpenURL("itms-apps://itunes.apple.com/app/idYOUR_ID");
    5. #endif
    you can use, http://, itms://, market:// or any other valid url.

    Otherwise, try to go for plugins.
     
    Last edited: Oct 9, 2014
  14. therealmattkain

    therealmattkain

    Joined:
    Oct 27, 2013
    Posts:
    7
    Has there been some change on this front? I'm trying to create a rate button within my game. As a test, I tried launching the App Store and opening an existing, published application. However, I've tried a variety of code variations (as well as app IDs), and I always get an App Store window that displays "ITEM NOT AVAILABLE". I can get links to work in Xcode and in browsers (so my app ids are definitely correct). But I cannot do it in C# code in Unity. I'm testing on an iPhone 5 with iOS 8. Some examples that I have tried:

    Application.OpenURL("itms-apps://itunes.apple.com/app/idYOUR_ID");
    Application.OpenURL("itms-apps://itunes.apple.com/us/app/idYOUR_ID");
    Application.OpenURL("https://itunes.apple.com/us/app/apple-store/idYOUR_ID?mt=8");

    Has anyone got this to work? Surely there is a simple way that I'm missing.
     
  15. imrankhanswati

    imrankhanswati

    Joined:
    Jul 14, 2016
    Posts:
    5

    this is just great. save my day.thank man.