APNS para "casi" todos

Preview:

DESCRIPTION

Enviar notificaciones push a los dispositivos con iOS desde Ruby.

Citation preview

Abraham BarreraDesarrolladorabout.me/abrahambarrera

APNS para “casi” todos

:Dc“CASI”

:Dc

Apple Push Notification Service

:Dc

:DciOS

:DcObjective-C

:Dc

:Dc

Aplicaciones Web móviles

>

Aplicaciones Nativas

Hace 3 años

:Dc

:Dc

Hoy

:Dc

JQuery Mobile, jQTouch, Sencha

:Dc

¿ GPS ?

:Dc

“Eso mismo lo podrías hacer desde una

aplicación Web en Safari”

Apple Push Notification Service

Utilizar tecnología Push

Sonidos alertas

distintivos

Apple Push Notification Service

En cualquier momento

:Dc

Apple Push Notification Service

Con la Aplicación “Cerrada”

:Dc

Apple Push Notification Service

Aplicaciones Web móviles

>

Aplicaciones Nativas

Aplicaciones Nativas

>

Aplicaciones Web móviles

Aplicaciones Nativas Híbridas

>

Aplicaciones Web móviles

Apple Push Notification Service

:Dc

¿Qué Necesitamos?

:Dc

Apple Push Notification Service

Una aplicación iOS bien Configurada

Un Provider (aplicación web)

Un iPhone Registrado

Apple Push Notification Service

Apple Push Notification Service

Apple Push Notification Service

Una Aplicación Bien configurada

:Dc

http://developer.apple.com/ios

(HOL)

Un iPhone Registrado

:Dc

- (void)applicationDidFinishLaunching:(UIApplication *)application { [[UIApplication sharedApplication]

registerForRemoteNotificationTypes: (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; }

- (void)application:(UIApplication *)app DidRegisterForRemoteNotificationsWithDeviceToken:

(NSData *)deviceToken {

[ProviderHelper setDeviceWithToken: deviceToken]; }

- (void)application:(UIApplication *)application didReceiveRemoteNotification: (NSDictionary *)userInfo { for (id key in userInfo) { NSLog(@"key: %@, value: %@", key,

[userInfo objectForKey:key]); } }

Un Provider

:Dc

apn_on_rails:Dc

Apple Push Notification Service

sudo gem install apn_on_rails

:Dc

Apple Push Notification Service

device = APN::Device.create(:token => "EL TOKEN”)notification = APN::Notification.newnotification.device = devicenotification.badge = 5notification.sound = truenotification.alert = "El Mensaje va aquí"notification.save

APN::Notification.send_notifications

$ rake apn:notifications:deliver:Dc

Apple Push Notification Service

Si no le gusta RoR:Dc

http://www.easyapns.com/

:Dc

Abraham Barrera C.Desarrollador

http://about.me/abrahambarrera

Recommended