SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Iter
13 Julio, 2016
Salvador Rodríguez Dávila
@srdzdv
Contenido
1. ¿Por qué iter?
2. Arquitectura
3. frameworks
4. google maps sdk
5. websockets
6. parse
7. openpay
¿Por qué iter?
Precio
ecología
equidad
Arquitectura
iOSAndroid WebApp
WebSockets
Parse Server
MongoDB
Heroku
frameworks
1. Google Maps SDK
2. Parse
3. PubNub
4. Fabric
CLLocationmanager
@autoreleasepool {
@try {
// Init locationManager to start getting Current position
locationManager = [[CLLocationManager alloc] init];
// Set the delegate
locationManager.delegate = self;
// Request location authorization
[locationManager requestAlwaysAuthorization];
[locationManager requestWhenInUseAuthorization];
// Set an accuracy level.
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
// Specify the type of activity your app is currently performing
locationManager.activityType = CLActivityTypeAutomotiveNavigation;
// Enable background location updates
locationManager.allowsBackgroundLocationUpdates = YES;
// Start location updates
[locationManager startUpdatingLocation];
}
@catch (NSException *exception){
UIAlertController *simpleAlert = [UIAlertController alertControllerWithTitle:@"Iter necesita permisos de
ubicación" message:@"Por favor habilita los servicios de ubicación de tu dispositivo para continuar."
preferredStyle:UIAlertControllerStyleAlert];
[simpleAlert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:simpleAlert animated:YES completion:nil];
}
} // autoreleasepool
Inicializar location manager
CLLocationmanager
// This method gets called everytime the device changes geographical position. It updates various global location
variables
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations {
CLLocation *newLocation = [locations lastObject];
currentLongitud = newLocation.coordinate.longitude;
currentLatitude = newLocation.coordinate.latitude;
//NSLog(@"Current Position: LONG: %f, LAT: %f", newLocation.coordinate.longitude, newLocation.coordinate.latitude);
camera = [GMSCameraPosition cameraWithLatitude:currentLatitude
longitude:currentLongitud
zoom:15];
greenMarker.position = CLLocationCoordinate2DMake(currentLatitude, currentLongitud);
confirmedChoferMarker.position = CLLocationCoordinate2DMake(currentLatitude, currentLongitud);
if (currentTrip) {
NSDate* eventDate = newLocation.timestamp;
NSTimeInterval howRecent = [eventDate timeIntervalSinceNow];
if (fabs(howRecent) < 15.0) { // increase time to more than one second
GMSCameraUpdate *locationUpdate = [GMSCameraUpdate setTarget:newLocation.coordinate zoom:15];
[self.mapView animateWithCameraUpdate:locationUpdate];
}
}
}
did update locations
google maps sdk
• Maps SDK for iOS
• Maps Geocoding API
• Maps Directions API
google maps sdk
//
// MainUserViewController.h
// ITER
//
// Created by Salvador Rodriguez on 2/24/16.
// Copyright © 2016 Nieu. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <PubNub/PubNub.h>
#import <Parse/Parse.h>
#import <ParseUI/ParseUI.h>
@import GoogleMaps;
@interface MainUserViewController : UIViewController <CLLocationManagerDelegate, PNObjectEventListener,
PFLogInViewControllerDelegate, PFSignUpViewControllerDelegate, GMSMapViewDelegate, UITextFieldDelegate>
@property (strong, nonatomic) IBOutlet GMSMapView *mapView;
@property (strong, nonatomic) IBOutlet UILabel *viajeEnProgresoStatusLabel;
@property (nonatomic) PubNub *clientUser;
@property (strong, nonatomic) IBOutlet UIButton *pedirCocheButton;
@property (strong, nonatomic) IBOutlet UIImageView *direccionFinalTextViewContainerView;
@property (strong, nonatomic) IBOutlet UIView *destinationContainerView;
@property (strong, nonatomic) IBOutlet UITextField *finalAddressTextField;
@property (strong, nonatomic) IBOutlet UIButton *updateCurrentLocationButton;
@property (strong, nonatomic) IBOutlet UILabel *currentAddressLabel;
@property (strong, nonatomic) IBOutlet UIImageView *buscandoCocheCercanoAlert;
@property (strong, nonatomic) IBOutlet UIActivityIndicatorView *buscandoCocheSpinner;
@property (strong, nonatomic) IBOutlet UIActivityIndicatorView *leftBuscandoCocheSpinner;
@property (strong, nonatomic) IBOutlet UIImageView *originAddressContainverView;
@property (strong, nonatomic) IBOutlet UIView *originAddressAllContainerView;
@property (strong, nonatomic) IBOutlet UIView *confirmarViajeButtonView;
@property (strong, nonatomic) IBOutlet UIButton *confirmarViajeButton;
@property (strong, nonatomic) IBOutlet UIButton *confirmarBacktoMainButton;
@property(strong, nonatomic) NSURLSession *markerSession;
@property (strong, nonatomic) IBOutlet UIImageView *tripResumeRiderView;
@end
google maps sdk
- (void)viewDidLoad {
// Init Google Maps View
self.mapView.delegate = self;
// Init Google Maps Camera Object with device's currrent location
camera = [GMSCameraPosition cameraWithLatitude:currentLatitude
longitude:currentLongitud
zoom:14]; // default = 15
[self.mapView setCamera:camera];
// Creates a marker in the center of the map.
greenMarker = [[GMSMarker alloc] init];
greenMarker.icon = [UIImage imageNamed:@"centerPositionMapDot"];
greenMarker.map = self.mapView;
destinationMarker = [[GMSMarker alloc] init];
// Driver marker init
chofer1Marker = [[GMSMarker alloc] init];
chofer1Marker.icon = [UIImage imageNamed:@"basicCarIconBlack"];
chofer1Marker.map = self.mapView;
}
Inicializar Mapa y custom markers
google maps sdk
<key>NSLocationAlwaysUsageDescription</key>
<string>iter necesita acceso a tu ubicación para poder funcionar
correctamente. Gracias.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>iter necesita acceso a tu ubicación para poder funcionar
correctamente. Gracias.</string>
Inicializar location manager
info.plist
google maps sdk
// This method receives a 2D coordinte and uses the reverseGeocodeCoordinate to get the street address from the
coordinate.
// It also updates the userpickup lat & lng global variables
- (void)getCurrentUserAddressForCoordinate:(CLLocationCoordinate2D)geoCodeCoordinate {
if (debug==1) {
NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));
}
// Set User long & lat for pickup
userPickupLatitude = geoCodeCoordinate.latitude;
userPickupLongitud = geoCodeCoordinate.longitude;
GMSGeocoder *geocoder = [[GMSGeocoder alloc] init];
[geocoder reverseGeocodeCoordinate:geoCodeCoordinate completionHandler:^(GMSReverseGeocodeResponse *geocodeResponse,
NSError *error){
if (!error) {
GMSAddress *addressResponse = [geocodeResponse firstResult];
NSArray *addressLineArray = addressResponse.lines;
self.riderOriginAddressTextField.text = addressLineArray[0];
[self validateCurrentLocationIsActiveForCity:addressResponse.locality];
}
}];
}
google Maps Geocoding API
google maps sdk
// NSURL Session
config = [NSURLSessionConfiguration defaultSessionConfiguration];
config.URLCache = [[NSURLCache alloc] initWithMemoryCapacity:2 * 1024 * 1024 diskCapacity:10 * 1024 * 1024
diskPath:@"DirectionData"];
self.markerSession = [NSURLSession sessionWithConfiguration:config];
NSString *urlString = [NSString stringWithFormat:
@"%@?origin=%f,%f&destination=%f,%f&sensor=true&key=%@",
@"https://maps.googleapis.com/maps/api/directions/json",
self.originCoordinate.latitude,
self.originCoordinate.longitude,
self.destinationCoordinate.latitude,
self.destinationCoordinate.longitude,
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"GMSServerAPIKey"]];
NSURL *directionsURL = [NSURL URLWithString:urlString];
NSURLSessionDataTask *directionsTask = [self.markerSession dataTaskWithURL:directionsURL
completionHandler:^(NSData *data, NSURLResponse *response, NSError *e) {
NSError *error = nil;
jsonDirections = [NSJSONSerialization JSONObjectWithData:data
options:NSJSONReadingMutableContainers error:&error];
double distance = [jsonDirections[@"routes"][0][@"legs"][0][@"distance"]
[@"value"] doubleValue];
double duration = [jsonDirections[@"routes"][0][@"legs"][0][@"duration"]
[@"value"] doubleValue];
distance = distance*0.001; NSLog(@"DISTANCE IN KILOMETERS: %f", distance);
duration = duration*0.0166667; NSLog(@"DURATION IN MINUTES: %f", duration);
}];
google Maps directions API
websockets
Información en tiempo real
websockets
// Initialize PubNub
NSString *pubnubPublishKey = @“pub-key-here";
NSString *pubnubSubscribeKey = @“sub-key-here";
/* Instantiate PubNub */
PNConfiguration *configuration = [PNConfiguration configurationWithPublishKey:pubnubPublishKey
subscribeKey:pubnubSubscribeKey];
configuration.keepTimeTokenOnListChange = NO;
configuration.catchUpOnSubscriptionRestore = NO;
configuration.restoreSubscription = NO;
self.client = [PubNub clientWithConfiguration:configuration];
inicializar
websockets
#pragma MARK - PUBNUB PUBNUB PUBNUB
// PubNub Receive Messages
- (void)client:(PubNub *)client didReceiveMessage:(PNMessageResult *)message {
// Validate that message comes from driver channel and its recipient is current user. Channel trip confirm
if ([message.data.subscribedChannel isEqual:pubnubDriverChannel] && [message.data.message[@"user"]
isEqualToString:[PFUser currentUser].objectId]) {
NSDictionary *messageTypeReceived = message.data.message;
if ([messageTypeReceived[@"message"] isEqualToString:@"onTrip"]) {
// Send Local Notification
UILocalNotification *localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:01];
localNotification.alertBody = @"Tu Viaje Iter ha Comenzado. ¡Buen viaje!";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.soundName = UILocalNotificationDefaultSoundName;;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
[self riderOnTrip];
}
else if ([message.data.subscribedChannel isEqual:pubnubCityChannel]) {
NSString *receivedLatitudeString = message.data.message[@"lat"];
NSString *receivedLongitudString = message.data.message[@"lng"];
double receivedLatitude = [receivedLatitudeString doubleValue];
double receivedLongitud = [receivedLongitudString doubleValue];
chofer1Marker.position = CLLocationCoordinate2DMake(receivedLatitude, receivedLongitud);
}
}
}
recibir mensajes
websockets
// Send new destination to Driver
[self.clientUser publish:@{@"message": @"rdrNewDestination",
@"destinationLat":destinationLatString,
@"userDestinationPlace":destinationFormattedAddress,
@"destinationLng":destinationLngString}
toChannel:pubnubDriverChannel compressed:YES withCompletion:nil];
publicar mensajes
parse
Persistencia
Sesiones
base de datos centralizada
Restauración de estados
cloud code
push notifications
parse
[PFUser logInWithUsernameInBackground:self.usernameTextField.text
password:self.passwordTextField.text block:^(PFUser *loggedUser, NSError
*error){
if (!error) {
NSLog(@"***USER LOGIN SUCCEEDED***");
IterRiderInitialViewController *iterRiderInitialViewController
= [self.storyboard
instantiateViewControllerWithIdentifier:@"IterRiderInitialViewController"];
[self presentViewController:iterRiderInitialViewController
animated:YES completion:nil];
}
else {
NSLog(@"LOG IN ERROR: %@", error);
}
}];
openpay
openpay
OPCard *card = [[OPCard alloc]init];
card.holderName = @"Juan Escamilla";
card.number = @"4111111111111111";
card.expirationMonth = @"08";
card.expirationYear = @"19";
card.cvv2 = @"132";
Openpay *openpay = [[Openpay alloc]
initWithMerchantId:MERCHANT_ID
apyKey:API_KEY
isProductionMode:NO];
[openpay createTokenWithCard:card
success:^(OPToken *token) {
} failure:^(NSError *error) {
}];
DIY Uber

Más contenido relacionado

La actualidad más candente

AngularJS Directives
AngularJS DirectivesAngularJS Directives
AngularJS DirectivesEyal Vardi
 
Evan Schultz - Angular Camp - ng2-redux
Evan Schultz - Angular Camp - ng2-reduxEvan Schultz - Angular Camp - ng2-redux
Evan Schultz - Angular Camp - ng2-reduxEvan Schultz
 
Workshop 20: ReactJS Part II Flux Pattern & Redux
Workshop 20: ReactJS Part II Flux Pattern & ReduxWorkshop 20: ReactJS Part II Flux Pattern & Redux
Workshop 20: ReactJS Part II Flux Pattern & ReduxVisual Engineering
 
State management in android applications
State management in android applicationsState management in android applications
State management in android applicationsGabor Varadi
 
AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.Yan Yankowski
 
AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS InternalEyal Vardi
 
Simplified Android Development with Simple-Stack
Simplified Android Development with Simple-StackSimplified Android Development with Simple-Stack
Simplified Android Development with Simple-StackGabor Varadi
 
Reactive state management with Jetpack Components
Reactive state management with Jetpack ComponentsReactive state management with Jetpack Components
Reactive state management with Jetpack ComponentsGabor Varadi
 
3D Touch: Preparando sua app para o futuro do iOS
3D Touch: Preparando sua app para o futuro do iOS3D Touch: Preparando sua app para o futuro do iOS
3D Touch: Preparando sua app para o futuro do iOSRodrigo Borges
 
Evan Schultz - Angular Summit - 2016
Evan Schultz - Angular Summit - 2016Evan Schultz - Angular Summit - 2016
Evan Schultz - Angular Summit - 2016Evan Schultz
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationEyal Vardi
 
Workshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte IIWorkshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte IIVisual Engineering
 
AngularJS $Provide Service
AngularJS $Provide ServiceAngularJS $Provide Service
AngularJS $Provide ServiceEyal Vardi
 
Workshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIWorkshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIVisual Engineering
 
A portlet-API based approach for application integration
A portlet-API based approach for application integrationA portlet-API based approach for application integration
A portlet-API based approach for application integrationwhabicht
 
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xUpgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xEyal Vardi
 
Reactive.architecture.with.Angular
Reactive.architecture.with.AngularReactive.architecture.with.Angular
Reactive.architecture.with.AngularEvan Schultz
 
React & Redux for noobs
React & Redux for noobsReact & Redux for noobs
React & Redux for noobs[T]echdencias
 

La actualidad más candente (20)

AngularJS Directives
AngularJS DirectivesAngularJS Directives
AngularJS Directives
 
Evan Schultz - Angular Camp - ng2-redux
Evan Schultz - Angular Camp - ng2-reduxEvan Schultz - Angular Camp - ng2-redux
Evan Schultz - Angular Camp - ng2-redux
 
Workshop 20: ReactJS Part II Flux Pattern & Redux
Workshop 20: ReactJS Part II Flux Pattern & ReduxWorkshop 20: ReactJS Part II Flux Pattern & Redux
Workshop 20: ReactJS Part II Flux Pattern & Redux
 
Basics of AngularJS
Basics of AngularJSBasics of AngularJS
Basics of AngularJS
 
State management in android applications
State management in android applicationsState management in android applications
State management in android applications
 
AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.
 
AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS Internal
 
Simplified Android Development with Simple-Stack
Simplified Android Development with Simple-StackSimplified Android Development with Simple-Stack
Simplified Android Development with Simple-Stack
 
Reactive state management with Jetpack Components
Reactive state management with Jetpack ComponentsReactive state management with Jetpack Components
Reactive state management with Jetpack Components
 
3D Touch: Preparando sua app para o futuro do iOS
3D Touch: Preparando sua app para o futuro do iOS3D Touch: Preparando sua app para o futuro do iOS
3D Touch: Preparando sua app para o futuro do iOS
 
Evan Schultz - Angular Summit - 2016
Evan Schultz - Angular Summit - 2016Evan Schultz - Angular Summit - 2016
Evan Schultz - Angular Summit - 2016
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
 
Workshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte IIWorkshop 13: AngularJS Parte II
Workshop 13: AngularJS Parte II
 
AngularJS $Provide Service
AngularJS $Provide ServiceAngularJS $Provide Service
AngularJS $Provide Service
 
AngularJS.part1
AngularJS.part1AngularJS.part1
AngularJS.part1
 
Workshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIWorkshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte III
 
A portlet-API based approach for application integration
A portlet-API based approach for application integrationA portlet-API based approach for application integration
A portlet-API based approach for application integration
 
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xUpgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.x
 
Reactive.architecture.with.Angular
Reactive.architecture.with.AngularReactive.architecture.with.Angular
Reactive.architecture.with.Angular
 
React & Redux for noobs
React & Redux for noobsReact & Redux for noobs
React & Redux for noobs
 

Destacado

Anna capdevila mòdul 2 activitat 3
Anna capdevila mòdul 2   activitat 3 Anna capdevila mòdul 2   activitat 3
Anna capdevila mòdul 2 activitat 3 Anna Capdevila
 
Macroview weekly news update - 3rd may 2016
Macroview   weekly news update - 3rd may 2016Macroview   weekly news update - 3rd may 2016
Macroview weekly news update - 3rd may 2016Carrie-Anne Smith
 
Marketing Plan of City of Dream Manado
Marketing Plan of City of Dream ManadoMarketing Plan of City of Dream Manado
Marketing Plan of City of Dream ManadoHERMAN FHERRO
 
Membangun website bisnis elegant nan profesional
Membangun website bisnis elegant nan profesionalMembangun website bisnis elegant nan profesional
Membangun website bisnis elegant nan profesionalRifki Fardianzah
 
Javascript 실행 가능한 코드(Executable Code)와 실행 콘텍스트(Execution Context), Lexical En...
Javascript 실행 가능한 코드(Executable Code)와 실행 콘텍스트(Execution Context), Lexical En...Javascript 실행 가능한 코드(Executable Code)와 실행 콘텍스트(Execution Context), Lexical En...
Javascript 실행 가능한 코드(Executable Code)와 실행 콘텍스트(Execution Context), Lexical En...Young-Beom Rhee
 
Parry_2016_EAGE_Wilson_Cycles_and_the_Opening_of_the_North Atlantic
Parry_2016_EAGE_Wilson_Cycles_and_the_Opening_of_the_North AtlanticParry_2016_EAGE_Wilson_Cycles_and_the_Opening_of_the_North Atlantic
Parry_2016_EAGE_Wilson_Cycles_and_the_Opening_of_the_North AtlanticChris Parry
 
Exclusivo ou Não Exclusivo? Apresentação + Negócio 06-02-2015
Exclusivo ou Não Exclusivo? Apresentação + Negócio 06-02-2015Exclusivo ou Não Exclusivo? Apresentação + Negócio 06-02-2015
Exclusivo ou Não Exclusivo? Apresentação + Negócio 06-02-2015Ermelinda Rosinha
 
Intro Protocol Oriented Programming
Intro Protocol Oriented Programming Intro Protocol Oriented Programming
Intro Protocol Oriented Programming NSCoder Mexico
 
Taming the Massive View Controllers
Taming the Massive View ControllersTaming the Massive View Controllers
Taming the Massive View ControllersNSCoder Mexico
 
NSCoder Spotify - From Plan to Done
NSCoder Spotify - From Plan to Done NSCoder Spotify - From Plan to Done
NSCoder Spotify - From Plan to Done NSCoder Mexico
 
NSCoder - Metal Collada
NSCoder - Metal ColladaNSCoder - Metal Collada
NSCoder - Metal ColladaNSCoder Mexico
 
Simplify your Life with Message Extensions in iOS 10
Simplify your Life with Message Extensions in iOS 10Simplify your Life with Message Extensions in iOS 10
Simplify your Life with Message Extensions in iOS 10NSCoder Mexico
 
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.Ambiente Livre
 

Destacado (20)

Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
Anna capdevila mòdul 2 activitat 3
Anna capdevila mòdul 2   activitat 3 Anna capdevila mòdul 2   activitat 3
Anna capdevila mòdul 2 activitat 3
 
Macroview weekly news update - 3rd may 2016
Macroview   weekly news update - 3rd may 2016Macroview   weekly news update - 3rd may 2016
Macroview weekly news update - 3rd may 2016
 
Marketing Plan of City of Dream Manado
Marketing Plan of City of Dream ManadoMarketing Plan of City of Dream Manado
Marketing Plan of City of Dream Manado
 
Membangun website bisnis elegant nan profesional
Membangun website bisnis elegant nan profesionalMembangun website bisnis elegant nan profesional
Membangun website bisnis elegant nan profesional
 
Javascript 실행 가능한 코드(Executable Code)와 실행 콘텍스트(Execution Context), Lexical En...
Javascript 실행 가능한 코드(Executable Code)와 실행 콘텍스트(Execution Context), Lexical En...Javascript 실행 가능한 코드(Executable Code)와 실행 콘텍스트(Execution Context), Lexical En...
Javascript 실행 가능한 코드(Executable Code)와 실행 콘텍스트(Execution Context), Lexical En...
 
Parry_2016_EAGE_Wilson_Cycles_and_the_Opening_of_the_North Atlantic
Parry_2016_EAGE_Wilson_Cycles_and_the_Opening_of_the_North AtlanticParry_2016_EAGE_Wilson_Cycles_and_the_Opening_of_the_North Atlantic
Parry_2016_EAGE_Wilson_Cycles_and_the_Opening_of_the_North Atlantic
 
Exclusivo ou Não Exclusivo? Apresentação + Negócio 06-02-2015
Exclusivo ou Não Exclusivo? Apresentação + Negócio 06-02-2015Exclusivo ou Não Exclusivo? Apresentação + Negócio 06-02-2015
Exclusivo ou Não Exclusivo? Apresentação + Negócio 06-02-2015
 
React Native
React NativeReact Native
React Native
 
NSCoder - Metal
NSCoder - MetalNSCoder - Metal
NSCoder - Metal
 
Intro Protocol Oriented Programming
Intro Protocol Oriented Programming Intro Protocol Oriented Programming
Intro Protocol Oriented Programming
 
Realm para iOS
Realm para iOSRealm para iOS
Realm para iOS
 
Taming the Massive View Controllers
Taming the Massive View ControllersTaming the Massive View Controllers
Taming the Massive View Controllers
 
NSCoder - iR Control
NSCoder - iR ControlNSCoder - iR Control
NSCoder - iR Control
 
NSCoder Spotify - From Plan to Done
NSCoder Spotify - From Plan to Done NSCoder Spotify - From Plan to Done
NSCoder Spotify - From Plan to Done
 
NSCoder Swift - UIKit
NSCoder Swift - UIKitNSCoder Swift - UIKit
NSCoder Swift - UIKit
 
NSCoder - Extension
NSCoder - ExtensionNSCoder - Extension
NSCoder - Extension
 
NSCoder - Metal Collada
NSCoder - Metal ColladaNSCoder - Metal Collada
NSCoder - Metal Collada
 
Simplify your Life with Message Extensions in iOS 10
Simplify your Life with Message Extensions in iOS 10Simplify your Life with Message Extensions in iOS 10
Simplify your Life with Message Extensions in iOS 10
 
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
Escalabilidade Linear com o Banco de Dados NoSQL Apache Cassandra.
 

Similar a DIY Uber

How to use geolocation in react native apps
How to use geolocation in react native appsHow to use geolocation in react native apps
How to use geolocation in react native appsInnovationM
 
HTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHexHTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHexTadayasu Sasada
 
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефонаКурсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефонаГлеб Тарасов
 
Recoil at Codete Webinars #3
Recoil at Codete Webinars #3Recoil at Codete Webinars #3
Recoil at Codete Webinars #3Mateusz Bryła
 
Android Location-based應用開發分享
Android Location-based應用開發分享Android Location-based應用開發分享
Android Location-based應用開發分享koji lin
 
Creating an Uber Clone - Part XVII - Transcript.pdf
Creating an Uber Clone - Part XVII - Transcript.pdfCreating an Uber Clone - Part XVII - Transcript.pdf
Creating an Uber Clone - Part XVII - Transcript.pdfShaiAlmog1
 
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONELUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONEMicrosoft Mobile Developer
 
097 smart devices-con_las_aplicaciones_de_gestión
097 smart devices-con_las_aplicaciones_de_gestión097 smart devices-con_las_aplicaciones_de_gestión
097 smart devices-con_las_aplicaciones_de_gestiónGeneXus
 
Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Jorge Maroto
 
Introduction to MapKit
Introduction to MapKitIntroduction to MapKit
Introduction to MapKitRob C
 
Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication developmentGanesh Gembali
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best PracticesYekmer Simsek
 
RESTfull with RestKit
RESTfull with RestKitRESTfull with RestKit
RESTfull with RestKitTaras Kalapun
 
Keeping Track of Moving Things: MapKit and CoreLocation in Depth
Keeping Track of Moving Things: MapKit and CoreLocation in DepthKeeping Track of Moving Things: MapKit and CoreLocation in Depth
Keeping Track of Moving Things: MapKit and CoreLocation in DepthGeoffrey Goetz
 
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArt
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArtArchitecture components, Константин Марс, TeamLead, Senior Developer, DataArt
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArtAlina Vilk
 
GNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in GnomeGNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in GnomeWilliam Lee
 
Capture image on eye blink
Capture image on eye blinkCapture image on eye blink
Capture image on eye blinkInnovationM
 
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...Chris Adamson
 

Similar a DIY Uber (20)

How to use geolocation in react native apps
How to use geolocation in react native appsHow to use geolocation in react native apps
How to use geolocation in react native apps
 
UIWebView Tips
UIWebView TipsUIWebView Tips
UIWebView Tips
 
HTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHexHTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHex
 
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефонаКурсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
 
Recoil at Codete Webinars #3
Recoil at Codete Webinars #3Recoil at Codete Webinars #3
Recoil at Codete Webinars #3
 
Android Location-based應用開發分享
Android Location-based應用開發分享Android Location-based應用開發分享
Android Location-based應用開發分享
 
Creating an Uber Clone - Part XVII - Transcript.pdf
Creating an Uber Clone - Part XVII - Transcript.pdfCreating an Uber Clone - Part XVII - Transcript.pdf
Creating an Uber Clone - Part XVII - Transcript.pdf
 
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONELUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
LUMIA APP LABS: HERE MAPS AND LOCATION APIS FOR WINDOWS PHONE
 
097 smart devices-con_las_aplicaciones_de_gestión
097 smart devices-con_las_aplicaciones_de_gestión097 smart devices-con_las_aplicaciones_de_gestión
097 smart devices-con_las_aplicaciones_de_gestión
 
Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)
 
Introduction to MapKit
Introduction to MapKitIntroduction to MapKit
Introduction to MapKit
 
Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication development
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
RESTfull with RestKit
RESTfull with RestKitRESTfull with RestKit
RESTfull with RestKit
 
Keeping Track of Moving Things: MapKit and CoreLocation in Depth
Keeping Track of Moving Things: MapKit and CoreLocation in DepthKeeping Track of Moving Things: MapKit and CoreLocation in Depth
Keeping Track of Moving Things: MapKit and CoreLocation in Depth
 
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArt
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArtArchitecture components, Константин Марс, TeamLead, Senior Developer, DataArt
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArt
 
GNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in GnomeGNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in Gnome
 
Zenly - Reverse geocoding
Zenly - Reverse geocodingZenly - Reverse geocoding
Zenly - Reverse geocoding
 
Capture image on eye blink
Capture image on eye blinkCapture image on eye blink
Capture image on eye blink
 
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
Core Location and Map Kit: Bringing Your Own Maps [Voices That Matter: iPhone...
 

Más de NSCoder Mexico

Aprendizaje reforzado con swift
Aprendizaje reforzado con swiftAprendizaje reforzado con swift
Aprendizaje reforzado con swiftNSCoder Mexico
 
Programación Orientada a Protocolos
Programación Orientada a ProtocolosProgramación Orientada a Protocolos
Programación Orientada a ProtocolosNSCoder Mexico
 
Interfaces en interface builder y por codigo
Interfaces en interface builder y por codigoInterfaces en interface builder y por codigo
Interfaces en interface builder y por codigoNSCoder Mexico
 
Core ML and Computer Vision
Core ML and Computer VisionCore ML and Computer Vision
Core ML and Computer VisionNSCoder Mexico
 
Intro programacion funcional
Intro programacion funcionalIntro programacion funcional
Intro programacion funcionalNSCoder Mexico
 
Mathematics en la programación
Mathematics en la programaciónMathematics en la programación
Mathematics en la programaciónNSCoder Mexico
 
Video juegos con SpriteKit y Swift
Video juegos con SpriteKit y SwiftVideo juegos con SpriteKit y Swift
Video juegos con SpriteKit y SwiftNSCoder Mexico
 
Introduction a ARToolkit
Introduction a ARToolkitIntroduction a ARToolkit
Introduction a ARToolkitNSCoder Mexico
 
Diseño Agil para Desarrolladores
Diseño Agil para DesarrolladoresDiseño Agil para Desarrolladores
Diseño Agil para DesarrolladoresNSCoder Mexico
 
Realtime Database with iOS and Firebase
Realtime Database with iOS and FirebaseRealtime Database with iOS and Firebase
Realtime Database with iOS and FirebaseNSCoder Mexico
 

Más de NSCoder Mexico (20)

Aprendizaje reforzado con swift
Aprendizaje reforzado con swiftAprendizaje reforzado con swift
Aprendizaje reforzado con swift
 
In app purchase
In app purchaseIn app purchase
In app purchase
 
Ib designables
Ib designablesIb designables
Ib designables
 
Programación Orientada a Protocolos
Programación Orientada a ProtocolosProgramación Orientada a Protocolos
Programación Orientada a Protocolos
 
Interfaces en interface builder y por codigo
Interfaces en interface builder y por codigoInterfaces en interface builder y por codigo
Interfaces en interface builder y por codigo
 
Introduction Swift
Introduction SwiftIntroduction Swift
Introduction Swift
 
Dependency Managers
Dependency ManagersDependency Managers
Dependency Managers
 
Taller PaintCode
Taller PaintCodeTaller PaintCode
Taller PaintCode
 
VIPER
VIPERVIPER
VIPER
 
Core ML and Computer Vision
Core ML and Computer VisionCore ML and Computer Vision
Core ML and Computer Vision
 
Intro programacion funcional
Intro programacion funcionalIntro programacion funcional
Intro programacion funcional
 
DIY Instagram
DIY InstagramDIY Instagram
DIY Instagram
 
Mathematics en la programación
Mathematics en la programaciónMathematics en la programación
Mathematics en la programación
 
Video juegos con SpriteKit y Swift
Video juegos con SpriteKit y SwiftVideo juegos con SpriteKit y Swift
Video juegos con SpriteKit y Swift
 
Unit Testing en iOS
Unit Testing en iOSUnit Testing en iOS
Unit Testing en iOS
 
Bridgefy SDK
Bridgefy SDKBridgefy SDK
Bridgefy SDK
 
Introduction a ARToolkit
Introduction a ARToolkitIntroduction a ARToolkit
Introduction a ARToolkit
 
Diseño Agil para Desarrolladores
Diseño Agil para DesarrolladoresDiseño Agil para Desarrolladores
Diseño Agil para Desarrolladores
 
Apple Watch
Apple WatchApple Watch
Apple Watch
 
Realtime Database with iOS and Firebase
Realtime Database with iOS and FirebaseRealtime Database with iOS and Firebase
Realtime Database with iOS and Firebase
 

Último

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

DIY Uber

  • 1. Iter 13 Julio, 2016 Salvador Rodríguez Dávila @srdzdv
  • 2. Contenido 1. ¿Por qué iter? 2. Arquitectura 3. frameworks 4. google maps sdk 5. websockets 6. parse 7. openpay
  • 5. frameworks 1. Google Maps SDK 2. Parse 3. PubNub 4. Fabric
  • 6. CLLocationmanager @autoreleasepool { @try { // Init locationManager to start getting Current position locationManager = [[CLLocationManager alloc] init]; // Set the delegate locationManager.delegate = self; // Request location authorization [locationManager requestAlwaysAuthorization]; [locationManager requestWhenInUseAuthorization]; // Set an accuracy level. locationManager.desiredAccuracy = kCLLocationAccuracyBest; // Specify the type of activity your app is currently performing locationManager.activityType = CLActivityTypeAutomotiveNavigation; // Enable background location updates locationManager.allowsBackgroundLocationUpdates = YES; // Start location updates [locationManager startUpdatingLocation]; } @catch (NSException *exception){ UIAlertController *simpleAlert = [UIAlertController alertControllerWithTitle:@"Iter necesita permisos de ubicación" message:@"Por favor habilita los servicios de ubicación de tu dispositivo para continuar." preferredStyle:UIAlertControllerStyleAlert]; [simpleAlert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]]; [self presentViewController:simpleAlert animated:YES completion:nil]; } } // autoreleasepool Inicializar location manager
  • 7. CLLocationmanager // This method gets called everytime the device changes geographical position. It updates various global location variables - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations { CLLocation *newLocation = [locations lastObject]; currentLongitud = newLocation.coordinate.longitude; currentLatitude = newLocation.coordinate.latitude; //NSLog(@"Current Position: LONG: %f, LAT: %f", newLocation.coordinate.longitude, newLocation.coordinate.latitude); camera = [GMSCameraPosition cameraWithLatitude:currentLatitude longitude:currentLongitud zoom:15]; greenMarker.position = CLLocationCoordinate2DMake(currentLatitude, currentLongitud); confirmedChoferMarker.position = CLLocationCoordinate2DMake(currentLatitude, currentLongitud); if (currentTrip) { NSDate* eventDate = newLocation.timestamp; NSTimeInterval howRecent = [eventDate timeIntervalSinceNow]; if (fabs(howRecent) < 15.0) { // increase time to more than one second GMSCameraUpdate *locationUpdate = [GMSCameraUpdate setTarget:newLocation.coordinate zoom:15]; [self.mapView animateWithCameraUpdate:locationUpdate]; } } } did update locations
  • 8. google maps sdk • Maps SDK for iOS • Maps Geocoding API • Maps Directions API
  • 9. google maps sdk // // MainUserViewController.h // ITER // // Created by Salvador Rodriguez on 2/24/16. // Copyright © 2016 Nieu. All rights reserved. // #import <UIKit/UIKit.h> #import <PubNub/PubNub.h> #import <Parse/Parse.h> #import <ParseUI/ParseUI.h> @import GoogleMaps; @interface MainUserViewController : UIViewController <CLLocationManagerDelegate, PNObjectEventListener, PFLogInViewControllerDelegate, PFSignUpViewControllerDelegate, GMSMapViewDelegate, UITextFieldDelegate> @property (strong, nonatomic) IBOutlet GMSMapView *mapView; @property (strong, nonatomic) IBOutlet UILabel *viajeEnProgresoStatusLabel; @property (nonatomic) PubNub *clientUser; @property (strong, nonatomic) IBOutlet UIButton *pedirCocheButton; @property (strong, nonatomic) IBOutlet UIImageView *direccionFinalTextViewContainerView; @property (strong, nonatomic) IBOutlet UIView *destinationContainerView; @property (strong, nonatomic) IBOutlet UITextField *finalAddressTextField; @property (strong, nonatomic) IBOutlet UIButton *updateCurrentLocationButton; @property (strong, nonatomic) IBOutlet UILabel *currentAddressLabel; @property (strong, nonatomic) IBOutlet UIImageView *buscandoCocheCercanoAlert; @property (strong, nonatomic) IBOutlet UIActivityIndicatorView *buscandoCocheSpinner; @property (strong, nonatomic) IBOutlet UIActivityIndicatorView *leftBuscandoCocheSpinner; @property (strong, nonatomic) IBOutlet UIImageView *originAddressContainverView; @property (strong, nonatomic) IBOutlet UIView *originAddressAllContainerView; @property (strong, nonatomic) IBOutlet UIView *confirmarViajeButtonView; @property (strong, nonatomic) IBOutlet UIButton *confirmarViajeButton; @property (strong, nonatomic) IBOutlet UIButton *confirmarBacktoMainButton; @property(strong, nonatomic) NSURLSession *markerSession; @property (strong, nonatomic) IBOutlet UIImageView *tripResumeRiderView; @end
  • 10. google maps sdk - (void)viewDidLoad { // Init Google Maps View self.mapView.delegate = self; // Init Google Maps Camera Object with device's currrent location camera = [GMSCameraPosition cameraWithLatitude:currentLatitude longitude:currentLongitud zoom:14]; // default = 15 [self.mapView setCamera:camera]; // Creates a marker in the center of the map. greenMarker = [[GMSMarker alloc] init]; greenMarker.icon = [UIImage imageNamed:@"centerPositionMapDot"]; greenMarker.map = self.mapView; destinationMarker = [[GMSMarker alloc] init]; // Driver marker init chofer1Marker = [[GMSMarker alloc] init]; chofer1Marker.icon = [UIImage imageNamed:@"basicCarIconBlack"]; chofer1Marker.map = self.mapView; } Inicializar Mapa y custom markers
  • 11. google maps sdk <key>NSLocationAlwaysUsageDescription</key> <string>iter necesita acceso a tu ubicación para poder funcionar correctamente. Gracias.</string> <key>NSLocationWhenInUseUsageDescription</key> <string>iter necesita acceso a tu ubicación para poder funcionar correctamente. Gracias.</string> Inicializar location manager info.plist
  • 12. google maps sdk // This method receives a 2D coordinte and uses the reverseGeocodeCoordinate to get the street address from the coordinate. // It also updates the userpickup lat & lng global variables - (void)getCurrentUserAddressForCoordinate:(CLLocationCoordinate2D)geoCodeCoordinate { if (debug==1) { NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd)); } // Set User long & lat for pickup userPickupLatitude = geoCodeCoordinate.latitude; userPickupLongitud = geoCodeCoordinate.longitude; GMSGeocoder *geocoder = [[GMSGeocoder alloc] init]; [geocoder reverseGeocodeCoordinate:geoCodeCoordinate completionHandler:^(GMSReverseGeocodeResponse *geocodeResponse, NSError *error){ if (!error) { GMSAddress *addressResponse = [geocodeResponse firstResult]; NSArray *addressLineArray = addressResponse.lines; self.riderOriginAddressTextField.text = addressLineArray[0]; [self validateCurrentLocationIsActiveForCity:addressResponse.locality]; } }]; } google Maps Geocoding API
  • 13. google maps sdk // NSURL Session config = [NSURLSessionConfiguration defaultSessionConfiguration]; config.URLCache = [[NSURLCache alloc] initWithMemoryCapacity:2 * 1024 * 1024 diskCapacity:10 * 1024 * 1024 diskPath:@"DirectionData"]; self.markerSession = [NSURLSession sessionWithConfiguration:config]; NSString *urlString = [NSString stringWithFormat: @"%@?origin=%f,%f&destination=%f,%f&sensor=true&key=%@", @"https://maps.googleapis.com/maps/api/directions/json", self.originCoordinate.latitude, self.originCoordinate.longitude, self.destinationCoordinate.latitude, self.destinationCoordinate.longitude, [[NSBundle mainBundle] objectForInfoDictionaryKey:@"GMSServerAPIKey"]]; NSURL *directionsURL = [NSURL URLWithString:urlString]; NSURLSessionDataTask *directionsTask = [self.markerSession dataTaskWithURL:directionsURL completionHandler:^(NSData *data, NSURLResponse *response, NSError *e) { NSError *error = nil; jsonDirections = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error]; double distance = [jsonDirections[@"routes"][0][@"legs"][0][@"distance"] [@"value"] doubleValue]; double duration = [jsonDirections[@"routes"][0][@"legs"][0][@"duration"] [@"value"] doubleValue]; distance = distance*0.001; NSLog(@"DISTANCE IN KILOMETERS: %f", distance); duration = duration*0.0166667; NSLog(@"DURATION IN MINUTES: %f", duration); }]; google Maps directions API
  • 15. websockets // Initialize PubNub NSString *pubnubPublishKey = @“pub-key-here"; NSString *pubnubSubscribeKey = @“sub-key-here"; /* Instantiate PubNub */ PNConfiguration *configuration = [PNConfiguration configurationWithPublishKey:pubnubPublishKey subscribeKey:pubnubSubscribeKey]; configuration.keepTimeTokenOnListChange = NO; configuration.catchUpOnSubscriptionRestore = NO; configuration.restoreSubscription = NO; self.client = [PubNub clientWithConfiguration:configuration]; inicializar
  • 16. websockets #pragma MARK - PUBNUB PUBNUB PUBNUB // PubNub Receive Messages - (void)client:(PubNub *)client didReceiveMessage:(PNMessageResult *)message { // Validate that message comes from driver channel and its recipient is current user. Channel trip confirm if ([message.data.subscribedChannel isEqual:pubnubDriverChannel] && [message.data.message[@"user"] isEqualToString:[PFUser currentUser].objectId]) { NSDictionary *messageTypeReceived = message.data.message; if ([messageTypeReceived[@"message"] isEqualToString:@"onTrip"]) { // Send Local Notification UILocalNotification *localNotification = [[UILocalNotification alloc] init]; localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:01]; localNotification.alertBody = @"Tu Viaje Iter ha Comenzado. ¡Buen viaje!"; localNotification.timeZone = [NSTimeZone defaultTimeZone]; localNotification.soundName = UILocalNotificationDefaultSoundName;; [[UIApplication sharedApplication] scheduleLocalNotification:localNotification]; [self riderOnTrip]; } else if ([message.data.subscribedChannel isEqual:pubnubCityChannel]) { NSString *receivedLatitudeString = message.data.message[@"lat"]; NSString *receivedLongitudString = message.data.message[@"lng"]; double receivedLatitude = [receivedLatitudeString doubleValue]; double receivedLongitud = [receivedLongitudString doubleValue]; chofer1Marker.position = CLLocationCoordinate2DMake(receivedLatitude, receivedLongitud); } } } recibir mensajes
  • 17. websockets // Send new destination to Driver [self.clientUser publish:@{@"message": @"rdrNewDestination", @"destinationLat":destinationLatString, @"userDestinationPlace":destinationFormattedAddress, @"destinationLng":destinationLngString} toChannel:pubnubDriverChannel compressed:YES withCompletion:nil]; publicar mensajes
  • 18. parse Persistencia Sesiones base de datos centralizada Restauración de estados cloud code push notifications
  • 19. parse [PFUser logInWithUsernameInBackground:self.usernameTextField.text password:self.passwordTextField.text block:^(PFUser *loggedUser, NSError *error){ if (!error) { NSLog(@"***USER LOGIN SUCCEEDED***"); IterRiderInitialViewController *iterRiderInitialViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"IterRiderInitialViewController"]; [self presentViewController:iterRiderInitialViewController animated:YES completion:nil]; } else { NSLog(@"LOG IN ERROR: %@", error); } }];
  • 21. openpay OPCard *card = [[OPCard alloc]init]; card.holderName = @"Juan Escamilla"; card.number = @"4111111111111111"; card.expirationMonth = @"08"; card.expirationYear = @"19"; card.cvv2 = @"132"; Openpay *openpay = [[Openpay alloc] initWithMerchantId:MERCHANT_ID apyKey:API_KEY isProductionMode:NO]; [openpay createTokenWithCard:card success:^(OPToken *token) { } failure:^(NSError *error) { }];