Cómo Puedo Iniciar La Aplicación Appstore Directamente desde mi Aplicación


He utilizado varias aplicaciones ahora que inician el itunes store directamente desde la aplicación. Incluso estoy usando algunos en mi iPod 2.1 2G.

Sé que hay un error en 2.1 que impide que los enlaces de appstore funcionen en safari, pero de alguna manera la gente está lanzando la appstore directamente, ni siquiera a través de safari.

¿Cómo se hace esto? ¿Es una función openURL indocumentada?

Author: Jeff, 2008-10-22

11 answers

Desde iTunes, arrastre el icono de su aplicación al escritorio, esto le dará un enlace que puede usar directamente (por ejemplo, http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284036524&mt=8 lanza la AppStore a Crucigramas, tanto en un escritorio como en un iPhone).

Pon esto en una NSURL y llama a openURL en ella.

 19
Author: Ben Gottlieb,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2008-10-22 18:37:39

Para ser extremadamente conciso:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://itunes.com/apps/appname"]];

Si desea enviar a todas las aplicaciones para un desarrollador, utilice

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://itunes.com/apps/developername"]];

Estos funcionan para iOS 4.1

Véase También Cómo vincular aplicaciones en la app store

 26
Author: Intentss,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 11:46:47

Descubrí cómo entrar directamente en la página de revisión de una aplicación en la AppStore.

Básicamente se hace como a continuación, no dude en leer mi blog post al respecto.

- (IBAction)gotoReviews:(id)sender
{
    NSString *str = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa";
    str = [NSString stringWithFormat:@"%@/wa/viewContentsUserReviews?", str]; 
    str = [NSString stringWithFormat:@"%@type=Purple+Software&id=", str];

    // Here is the app id from itunesconnect
    str = [NSString stringWithFormat:@"%@289382458", str]; 

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
 16
Author: epatel,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-09-03 17:18:35

Si desea mostrar los detalles de la aplicación en lugar de las reseñas, puede usar la url de esta manera:

NSString *appId    = @"app id";
NSString *endPoint = [NSString stringWithFormat:@"phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@&mt=8", appId];
NSString *link     = [NSString stringWithFormat:@"itms-apps://%@", endPoint];

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:link]];

He probado esto en mi iPhone con iOS 6.1 y te redirigirá a la aplicación App Store inmediatamente.

 6
Author: NielsKoole,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-04-17 08:15:17

Ben Gottlieb tiene razón, pero hay una forma más rápida de obtener la URL: Puede hacer clic con el botón derecho en cualquier icono de aplicación en iTunes y seleccionar "Copiar URL de iTunes Store".

Luego llama UIApplication openURL en él.

 5
Author: Marco,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2008-10-22 20:07:17

Asegúrate de que diga "phobos.apple.com" y no "itunes.apple.com"

El primero abre la Tienda de aplicaciones directamente, mientras que el segundo abrirá MobileSafari primero, luego la Tienda de aplicaciones.

 2
Author: matt,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-01-13 01:56:05

Puede obtener su AppID de la itunesconnect.apple.com "Administrar sus Aplicaciones"

 2
Author: Eugene,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2010-10-04 19:41:00

Si no desea obtener el enlace para iTunes, puede hacerlo.

  1. seleccione su aplicación en AppStore
  2. haz clic en el botón Decirle a un amigo en la parte superior derecha.
  3. enviar por correo electrónico el enlace a sí mismo

He tenido este trabajo en el momento en que el enlace de iTunes no lo haría.

 1
Author: Jamey McElveen,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2008-11-05 21:07:15

Si tiene un enlace de afiliado y desea seguir abriendo la aplicación App Store directamente sin Safari en el medio, podría usar un UIWebView oculto o un NSURLConnection. Para esto último ver este post http://gamesfromwithin.com/handling-app-store-and-linkshare-links

 0
Author: Alexei Sholik,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-06-01 13:22:34

Aquí está el código que uso y lo probé contra las diversas versiones de iOS mencionadas. Obviamente cambia el id de cliente para que sea el tuyo:

- (void)showOurAppsInAppStore
{        
    NSString *searchUrl = nil;
    // iPad
    if ([DeviceController isDeviceAnIpad]) {
        searchUrl = @"itms-apps://itunes.apple.com/us/artist/seligman-ventures-ltd/id326161338";
    }
    // iPhone / iPod Touch
    else {
        // iOS 7+
        if ([DeviceController isDeviceOperatingSystemAtleast:@"7.0"]) {
            searchUrl = @"itms-apps://itunes.apple.com/artist/seligman-ventures-ltd/id326161338";
        }
        // iOS 6
        else if ([DeviceController isDeviceOperatingSystemAtleast:@"6.0"]) {
            searchUrl = @"itms-apps://ax.itunes.apple.com/artist/seligman-ventures-ltd/id326161338";
        }
        // Pre iOS 6
        else {
            NSString *companyName = @"Seligman Ventures";
            searchUrl = [NSString stringWithFormat:@"http://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?WOURLEncoding=ISO8859_1&lang=1&output=lm&country=US&term=%@&media=software", [companyName stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
        }
    }

    [[UIApplication sharedApplication] openURL: [NSURL URLWithString:searchUrl]];
}
 0
Author: Charlie Seligman,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-11 18:52:22

Si acaba de lanzar su aplicación... todavía no tendrás un " ID de aplicación#"... así que ninguno de esos métodos funcionará.

Tuve que insertar un "enlace que no funciona" en mi v1.0... y luego más adelante en mi actualización v1. 1... se agregó el enlace real y el número de identificación de la aplicación.

 -1
Author: Annette,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2010-08-03 04:25:55