SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Build a WhatsApp clone in 2 hours
Startup Weekend Bootcamp - powered by skygear.io

David Ng (Product Manager at Skygear)
Agenda
• Getting hands on how to build a WhatsApp-like mobile
application.
• What skills do you need.
• … and tools you need.
• Some code to show.
What skills do I need?
• User Experience (UX) design
• Mobile side programming
• Server side programming
WhatsApp’s Stack
What it is and what it is not
• It is a technical discussion on what you can do to build
WhatsApp-like Chat app with limited resources.
• It is not what we encourage cloning other’s product.
• It is not you can build what all WhatsApp now supports in
2 hours.
Features that an ideal chat app must have
• Security
• Real time connectivity
• Group conversations
• Presence indicators
What’s in WhatsApp first version
• Signing up
• Conversation List
• Creating Conversations (1-on-1 and Group Chat)
• Message List
• Send and receive messages
Skygear
• An open-source project in Hong Kong
• Managed Hosting at skygear.io
• Commercial Support available
• Written in Go
Setup
• Sign up your chat server at skygear.io
• Obtain your Server endpoint and API Key in the INFO tab
Setting up the project
• Open a new Xcode Project
• pod init
• Update Podfile
• pod install
pod 'JSQMessagesViewController', '~> 7.3.4'
pod 'MBProgressHUD', '~> 1.0.0'
pod 'SKYKit', :git => 'https://github.com/SkygearIO/skygear-SDK-iOS.git', :commit => '4516b15'
pod 'SKYKitChat', :git => 'https://github.com/SkygearIO/chat-SDK-iOS.git', :commit => '08235f2'
Frontend
• We are using JSQMessagesViewController for the
front-end UI
Configure Skygear Endpoint for your App
• Config these lines to connect to Skygear Server
• Your app will then be connected to the cloud!
SKYContainer.default().configAddress("<Your endpoint url>")
SKYContainer.default().configure(withAPIKey: "<Your API Key>")
Signing up your user
• We can use the signup API in Skygear to signup a user
SKYContainer.default().signup(withEmail: emailField.text, password:
passwordField.text) { (user, error) in
if (error != nil) {
self.showAlert(error as! NSError)
return
}
print("Signed up as: (user)")
}
Conversation List
func fetchUserConversations(completion: (() -> Void)?) {
chat?.fetchUserConversations { (conversations, error) in
if let err = error {
let alert = UIAlertController(title: "Unable to load
conversations", message: err.localizedDescription, preferredStyle:
UIAlertControllerStyle.alert)
self.present(alert, animated: true, completion: nil)
return
}
if let fetchedConversations = conversations {
print("Fetched (fetchedConversations.count) user
conversations.")
self.conversations = fetchedConversations
}
}
Creating Conversations
• the CreateConversation API
chat?.createConversation(participantIDs: viewController.participantIDs,
title: title,
metadata: nil,
completion: { (userConversation, error) in
hud.hide(animated: true)
if error != nil {
return
}
})
Message List
chat.fetchMessages(conversation: conversation.conversation,
limit: 100,
beforeTime: nil,
completion: { (messages, error) in
if let err = error {
return
}
if let messages = messages {
self.messages = messages.reversed()
}
})
Send and receive messages
let message = SKYMessage()!
message.body = text
message.creatorUserRecordID =
SKYContainer.default().currentUserRecordID
chat.addMessage(message, to: (conversation?.conversation)!,
completion: { (msg, _) in
if let sentMessage = msg {
guard let transientMessageIndex = self.messages.index(of:
message) else {
return
}
}
Summary
• It takes much less effort to build a full-featured chat app.
• Utilize good resources to make it easier.

Más contenido relacionado

La actualidad más candente

Trojan virus & backdoors
Trojan virus & backdoorsTrojan virus & backdoors
Trojan virus & backdoorsShrey Vyas
 
Cross platform mobile application devlopment
Cross platform mobile application devlopmentCross platform mobile application devlopment
Cross platform mobile application devlopmentPrabhat gangwar
 
Chromecast Technology
Chromecast Technology Chromecast Technology
Chromecast Technology Kiran Girase
 
Client server chat application
Client server chat applicationClient server chat application
Client server chat applicationPiyush Rawat
 
Tools and methods used in cyber crime
Tools and methods used in cyber crimeTools and methods used in cyber crime
Tools and methods used in cyber crimeshubhravrat Deshpande
 
Transport layer security (tls)
Transport layer security (tls)Transport layer security (tls)
Transport layer security (tls)Kalpesh Kalekar
 
Built in classes in java
Built in classes in javaBuilt in classes in java
Built in classes in javaMahmoud Ali
 
Building an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackBuilding an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackdivyapisces
 
Chat Application | RSD
Chat Application | RSDChat Application | RSD
Chat Application | RSDRajon
 
The Future of Cyber Security
The Future of Cyber SecurityThe Future of Cyber Security
The Future of Cyber SecurityStephen Lahanas
 

La actualidad más candente (20)

Wireshark Basic Presentation
Wireshark Basic PresentationWireshark Basic Presentation
Wireshark Basic Presentation
 
Trojan virus & backdoors
Trojan virus & backdoorsTrojan virus & backdoors
Trojan virus & backdoors
 
Cross platform mobile application devlopment
Cross platform mobile application devlopmentCross platform mobile application devlopment
Cross platform mobile application devlopment
 
Google Maps in Android
Google Maps in AndroidGoogle Maps in Android
Google Maps in Android
 
Winrunner
WinrunnerWinrunner
Winrunner
 
Packet sniffers
Packet sniffersPacket sniffers
Packet sniffers
 
Chromecast Technology
Chromecast Technology Chromecast Technology
Chromecast Technology
 
Client server chat application
Client server chat applicationClient server chat application
Client server chat application
 
Tools and methods used in cyber crime
Tools and methods used in cyber crimeTools and methods used in cyber crime
Tools and methods used in cyber crime
 
Chat application
Chat applicationChat application
Chat application
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Transport layer security (tls)
Transport layer security (tls)Transport layer security (tls)
Transport layer security (tls)
 
Built in classes in java
Built in classes in javaBuilt in classes in java
Built in classes in java
 
Social Media Forensics
Social Media ForensicsSocial Media Forensics
Social Media Forensics
 
Building an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stackBuilding an E-commerce website in MEAN stack
Building an E-commerce website in MEAN stack
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Safety app for woman
Safety app for womanSafety app for woman
Safety app for woman
 
Chat Application | RSD
Chat Application | RSDChat Application | RSD
Chat Application | RSD
 
Wireshark Tutorial
Wireshark TutorialWireshark Tutorial
Wireshark Tutorial
 
The Future of Cyber Security
The Future of Cyber SecurityThe Future of Cyber Security
The Future of Cyber Security
 

Destacado

A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)Oursky
 
How to use Flux (pattern) in React?
How to use Flux (pattern) in React?How to use Flux (pattern) in React?
How to use Flux (pattern) in React?Jane Chung
 
How to build a Whatsapp clone in 2 hours
How to build a Whatsapp clone in 2 hoursHow to build a Whatsapp clone in 2 hours
How to build a Whatsapp clone in 2 hoursJane Chung
 
WhatsApp Chat Hacking/Stealing POC
WhatsApp Chat Hacking/Stealing POCWhatsApp Chat Hacking/Stealing POC
WhatsApp Chat Hacking/Stealing POCE Hacking
 
What Made WhatsApp Worth $19 Billion?
What Made WhatsApp Worth $19 Billion?What Made WhatsApp Worth $19 Billion?
What Made WhatsApp Worth $19 Billion?Sean Ellis
 
WhatsApp and the future of digital marketing
WhatsApp and the future of digital marketingWhatsApp and the future of digital marketing
WhatsApp and the future of digital marketingFernanda Saboia
 
Whatsapp PPT Presentation
Whatsapp PPT PresentationWhatsapp PPT Presentation
Whatsapp PPT PresentationVOCCE ICT
 
Project report on 'customer satisfaction towards whatsapp'
Project report on 'customer satisfaction towards whatsapp'Project report on 'customer satisfaction towards whatsapp'
Project report on 'customer satisfaction towards whatsapp'Chirag Patel
 

Destacado (12)

A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)
 
How to use Flux (pattern) in React?
How to use Flux (pattern) in React?How to use Flux (pattern) in React?
How to use Flux (pattern) in React?
 
How to build a Whatsapp clone in 2 hours
How to build a Whatsapp clone in 2 hoursHow to build a Whatsapp clone in 2 hours
How to build a Whatsapp clone in 2 hours
 
WhatsApp Chat Hacking/Stealing POC
WhatsApp Chat Hacking/Stealing POCWhatsApp Chat Hacking/Stealing POC
WhatsApp Chat Hacking/Stealing POC
 
What Made WhatsApp Worth $19 Billion?
What Made WhatsApp Worth $19 Billion?What Made WhatsApp Worth $19 Billion?
What Made WhatsApp Worth $19 Billion?
 
WhatsApp and the future of digital marketing
WhatsApp and the future of digital marketingWhatsApp and the future of digital marketing
WhatsApp and the future of digital marketing
 
Whatsapp
WhatsappWhatsapp
Whatsapp
 
Whatsapp project work
Whatsapp project workWhatsapp project work
Whatsapp project work
 
Whatsapp PPT Presentation
Whatsapp PPT PresentationWhatsapp PPT Presentation
Whatsapp PPT Presentation
 
whatsapp ppt
whatsapp pptwhatsapp ppt
whatsapp ppt
 
Project report on 'customer satisfaction towards whatsapp'
Project report on 'customer satisfaction towards whatsapp'Project report on 'customer satisfaction towards whatsapp'
Project report on 'customer satisfaction towards whatsapp'
 
Strategy on whatsapp
Strategy on whatsappStrategy on whatsapp
Strategy on whatsapp
 

Similar a How to build a Whatsapp clone in 2 hours

Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntAshley Roach
 
Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices LivePerson
 
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT ConferenceTelerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT ConferenceJen Looper
 
Unleash the power of Serverless Computing
Unleash the power of Serverless ComputingUnleash the power of Serverless Computing
Unleash the power of Serverless ComputingGaurav Madaan
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsSriram Hariharan
 
Open API Specifications - formerly swagger
Open API Specifications - formerly swaggerOpen API Specifications - formerly swagger
Open API Specifications - formerly swaggerPradeep Kumar
 
Getting started with development in azure
Getting started with development in azureGetting started with development in azure
Getting started with development in azureJasjit Chopra
 
Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...BizTalk360
 
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.jsAsynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.jsChristian Heindel
 
Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Takumi Sakamoto
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsAleksandar Bozinovski
 
Automation in iOS development
Automation in iOS developmentAutomation in iOS development
Automation in iOS developmentCong Nguyen
 
Exploring pwa for shopware
Exploring pwa for shopwareExploring pwa for shopware
Exploring pwa for shopwareSander Mangel
 
Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...BizTalk360
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples Yochay Kiriaty
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMartinSotirov
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017Amazon Web Services
 

Similar a How to build a Whatsapp clone in 2 hours (20)

Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger Hunt
 
Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices
 
Widgets neil
Widgets neilWidgets neil
Widgets neil
 
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT ConferenceTelerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT Conference
 
Unleash the power of Serverless Computing
Unleash the power of Serverless ComputingUnleash the power of Serverless Computing
Unleash the power of Serverless Computing
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIs
 
Open API Specifications - formerly swagger
Open API Specifications - formerly swaggerOpen API Specifications - formerly swagger
Open API Specifications - formerly swagger
 
slides.pptx
slides.pptxslides.pptx
slides.pptx
 
Getting started with development in azure
Getting started with development in azureGetting started with development in azure
Getting started with development in azure
 
Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...
 
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.jsAsynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
 
Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure Functions
 
Automation in iOS development
Automation in iOS developmentAutomation in iOS development
Automation in iOS development
 
Exploring pwa for shopware
Exploring pwa for shopwareExploring pwa for shopware
Exploring pwa for shopware
 
Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to Native
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017
 

Más de Oursky

Build cloud native apps with Docker and Kubernetes
Build cloud native apps with Docker and KubernetesBuild cloud native apps with Docker and Kubernetes
Build cloud native apps with Docker and KubernetesOursky
 
WebAR - "Build once, deploy anywhere"
WebAR - "Build once, deploy anywhere"WebAR - "Build once, deploy anywhere"
WebAR - "Build once, deploy anywhere"Oursky
 
如何用連登 data 訓練廣東話 chatbot (How to use data from a popular forum to train a Can...
如何用連登 data 訓練廣東話 chatbot (How to use data from a popular forum to train a Can...如何用連登 data 訓練廣東話 chatbot (How to use data from a popular forum to train a Can...
如何用連登 data 訓練廣東話 chatbot (How to use data from a popular forum to train a Can...Oursky
 
Common issues QA teams often find
Common issues QA teams often findCommon issues QA teams often find
Common issues QA teams often findOursky
 
Using cyclomatic complexity to measure code complexity
Using cyclomatic complexity to measure code complexityUsing cyclomatic complexity to measure code complexity
Using cyclomatic complexity to measure code complexityOursky
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...Oursky
 
How to use Flux (pattern) in React?
How to use Flux (pattern) in React?How to use Flux (pattern) in React?
How to use Flux (pattern) in React?Oursky
 

Más de Oursky (7)

Build cloud native apps with Docker and Kubernetes
Build cloud native apps with Docker and KubernetesBuild cloud native apps with Docker and Kubernetes
Build cloud native apps with Docker and Kubernetes
 
WebAR - "Build once, deploy anywhere"
WebAR - "Build once, deploy anywhere"WebAR - "Build once, deploy anywhere"
WebAR - "Build once, deploy anywhere"
 
如何用連登 data 訓練廣東話 chatbot (How to use data from a popular forum to train a Can...
如何用連登 data 訓練廣東話 chatbot (How to use data from a popular forum to train a Can...如何用連登 data 訓練廣東話 chatbot (How to use data from a popular forum to train a Can...
如何用連登 data 訓練廣東話 chatbot (How to use data from a popular forum to train a Can...
 
Common issues QA teams often find
Common issues QA teams often findCommon issues QA teams often find
Common issues QA teams often find
 
Using cyclomatic complexity to measure code complexity
Using cyclomatic complexity to measure code complexityUsing cyclomatic complexity to measure code complexity
Using cyclomatic complexity to measure code complexity
 
How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...How to write better code: in-depth best practices for writing readable, simpl...
How to write better code: in-depth best practices for writing readable, simpl...
 
How to use Flux (pattern) in React?
How to use Flux (pattern) in React?How to use Flux (pattern) in React?
How to use Flux (pattern) in React?
 

Último

WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 

Último (20)

WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

How to build a Whatsapp clone in 2 hours

  • 1. Build a WhatsApp clone in 2 hours Startup Weekend Bootcamp - powered by skygear.io David Ng (Product Manager at Skygear)
  • 2. Agenda • Getting hands on how to build a WhatsApp-like mobile application. • What skills do you need. • … and tools you need. • Some code to show.
  • 3. What skills do I need? • User Experience (UX) design • Mobile side programming • Server side programming
  • 5. What it is and what it is not • It is a technical discussion on what you can do to build WhatsApp-like Chat app with limited resources. • It is not what we encourage cloning other’s product. • It is not you can build what all WhatsApp now supports in 2 hours.
  • 6. Features that an ideal chat app must have • Security • Real time connectivity • Group conversations • Presence indicators
  • 7. What’s in WhatsApp first version • Signing up • Conversation List • Creating Conversations (1-on-1 and Group Chat) • Message List • Send and receive messages
  • 8. Skygear • An open-source project in Hong Kong • Managed Hosting at skygear.io • Commercial Support available • Written in Go
  • 9. Setup • Sign up your chat server at skygear.io • Obtain your Server endpoint and API Key in the INFO tab
  • 10. Setting up the project • Open a new Xcode Project • pod init • Update Podfile • pod install pod 'JSQMessagesViewController', '~> 7.3.4' pod 'MBProgressHUD', '~> 1.0.0' pod 'SKYKit', :git => 'https://github.com/SkygearIO/skygear-SDK-iOS.git', :commit => '4516b15' pod 'SKYKitChat', :git => 'https://github.com/SkygearIO/chat-SDK-iOS.git', :commit => '08235f2'
  • 11. Frontend • We are using JSQMessagesViewController for the front-end UI
  • 12. Configure Skygear Endpoint for your App • Config these lines to connect to Skygear Server • Your app will then be connected to the cloud! SKYContainer.default().configAddress("<Your endpoint url>") SKYContainer.default().configure(withAPIKey: "<Your API Key>")
  • 13. Signing up your user • We can use the signup API in Skygear to signup a user SKYContainer.default().signup(withEmail: emailField.text, password: passwordField.text) { (user, error) in if (error != nil) { self.showAlert(error as! NSError) return } print("Signed up as: (user)") }
  • 14. Conversation List func fetchUserConversations(completion: (() -> Void)?) { chat?.fetchUserConversations { (conversations, error) in if let err = error { let alert = UIAlertController(title: "Unable to load conversations", message: err.localizedDescription, preferredStyle: UIAlertControllerStyle.alert) self.present(alert, animated: true, completion: nil) return } if let fetchedConversations = conversations { print("Fetched (fetchedConversations.count) user conversations.") self.conversations = fetchedConversations } }
  • 15. Creating Conversations • the CreateConversation API chat?.createConversation(participantIDs: viewController.participantIDs, title: title, metadata: nil, completion: { (userConversation, error) in hud.hide(animated: true) if error != nil { return } })
  • 16. Message List chat.fetchMessages(conversation: conversation.conversation, limit: 100, beforeTime: nil, completion: { (messages, error) in if let err = error { return } if let messages = messages { self.messages = messages.reversed() } })
  • 17. Send and receive messages let message = SKYMessage()! message.body = text message.creatorUserRecordID = SKYContainer.default().currentUserRecordID chat.addMessage(message, to: (conversation?.conversation)!, completion: { (msg, _) in if let sentMessage = msg { guard let transientMessageIndex = self.messages.index(of: message) else { return } }
  • 18. Summary • It takes much less effort to build a full-featured chat app. • Utilize good resources to make it easier.