SlideShare a Scribd company logo
1 of 26
Download to read offline
sketchioapp.com
Building a drawing mobile app using parse
Sketchio is a fun and easy way to quickly make
drawings and share them with friends on Facebook,
Twitter, Instagram or via email.
About me
John Tubert @jtubert
Group Senior Technical Director, R/GA
Agenda
● The app
○ Demo
○ Gallery
○ Design
○ Sketchio 2.0
○ Libraries
○ Code
○ Backend
○ Challenges
● Website for app
○ Responsive
○ Code
○ Testing
http://www.youtube.com/watch?v=Y7pO9K_7NI8
Gallery
Gallery
The app: Design
I am not a designer, so why try to be one?
Design by the talented Amin Torres
Sketchio 2.0
The app: libraries
● Testflight sdk
● Flurry sdk
● Parse sdk
● Color selector
The app: backend
I used parse for the backend, so no databases were created or servers
were setup.
The code
Parse: Facebook login
https://gist.github.com/jtubert/6731509
- (IBAction)loginButtonTouchHandler:(id)sender{
NSArray *permissionsArray = @[@"user_about_me"];
Parse: Facebook login
https://gist.github.com/jtubert/6731509
- (IBAction)loginButtonTouchHandler:(id)sender{
NSArray *permissionsArray = @[@"user_about_me"];
[PFFacebookUtils logInWithPermissions:permissionsArray block:^(PFUser *user, NSError *error) {
if (!user) {
if (!error) {
NSLog(@"Uh oh. The user cancelled the Facebook login.");
} else {
NSLog(@"Uh oh. An error occurred: %@", error);
}
} else if (user.isNew) {
[self start];
} else {
[self start];
}
}];
}
Parse: Save sketch
https://gist.github.com/jtubert/6731589
- (void)saveSketch:(UIImage *)aSketch {
NSData *imageData = UIImageJPEGRepresentation(aSketch, 0.8f);
PFFile* photoFile = [PFFile fileWithData:imageData];
[photoFile saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (succeeded) {
//NSLog(@"Sketch uploaded successfully");
}
}];
Parse: Save sketch (continue)
// create a photo object
PFObject *photo = [PFObject objectWithClassName:@”Photo”];
[photo setObject:[PFUser currentUser] forKey:@”user”];
[photo setObject:photoFile forKey:@”image”];
// photos are public, but may only be modified by the user who uploaded them
PFACL *photoACL = [PFACL ACLWithUser:[PFUser currentUser]];
[photoACL setPublicReadAccess:YES];
photo.ACL = photoACL;
[photo saveInBackground];
}
Parse: Get sketches
https://gist.github.com/jtubert/6743534
PFQuery *queryPhoto = [PFQuery queryWithClassName:@"Photo"];
[queryPhoto whereKey:@”user” equalTo:[PFUser currentUser]];
[queryPhoto orderByDescending:@"createdAt"];
[queryPhoto findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
//handle sketches
}
Mirror lines
https://gist.github.com/jtubert/6745160
-(void) mirroringX1:(float)x1 y1:(float)y1 x2:(float)x2 y2:(float)y2{
float deltaAngle = 360 / totalLines;
float deltaAngleRadian = [self degreesToRadian:deltaAngle];
float centerX = self.frame.size.width / 2;
float centerY = self.frame.size.height / 2;
float distance1 = [self distX1:x1 y1:y1 x2:centerX y2:centerY];
float distance2 = [self distX1:x2 y1:y2 x2:centerX y2:centerY];
float deltaY1 = y1-centerY;
float deltaX1 = x1-centerX;
float deltaY2 = y2-centerY;
float deltaX2 = x2-centerX;
Mirror lines (continue)
float angle1 = atan2(deltaY1, deltaX1);
float angle2 = atan2(deltaY2, deltaX2);
for(int i = 0; i < totalLines;i++){
float newX1 = centerX + distance1 * sin(angle1 + (i * deltaAngleRadian));
float newY1 = centerY - distance1 * cos(angle1 + (i * deltaAngleRadian));
float newX2 = centerX + distance2 * sin(angle2 + (i * deltaAngleRadian));
float newY2 = centerY - distance2 * cos(angle2 + (i * deltaAngleRadian));
[self lineX1:newX1 y1:newY1 x2:newX2 y2:newY2];
}
}
The app: challenges
● Undo/redo, Erase and background color
● Multiline
● App store down!
The website for the app
Website: Responsive
Using webflow.com to easily create a
responsive site...
Website - login
https://gist.github.com/jtubert/6759029
Parse.initialize(KEY, SECRET);
window.fbAsyncInit = function() {
// init the FB JS SDK
Parse.FacebookUtils.init({
appId : '1386686244890246', // App ID from the app dashboard
channelUrl : 'channel.html', // Channel file for x-domain comms
status : false, // check login status
cookie : true, // enable cookies to allow Parse to access the session
xfbml : true // parse XFBML
});
};
….
Website - login (continue)
$('#signin').click(function (e) {
Parse.FacebookUtils.logIn(null, {
success: function (user) {
console.log("login successful”);
},
error: function (user, error) {
console.log("Oops, something went wrong.");
}
});
Website - get sketches
https://gist.github.com/jtubert/6747749
Parse.initialize(KEY, SECRET);
var Photo = Parse.Object.extend("Photo");
var query = new Parse.Query(Photo);
query.equalTo("user", Parse.User.current());
query.descending("createdAt");
query.find({
success: function(photosArr) {
//show images
},
error: function(object, error) {
//console.log(error);
}
});
Website: Testing
This is a personal projects, and I don’t have many different
devices/computers/systems.
Hello Browserstack!
http://www.browserstack.com/screenshots/471a15bfb6a36a4581d812e2c157fbad0d1c8c38
Email: feedback@sketchioapp.com
url: http://www.sketchioapp.com
Facebook: https://www.facebook.com/sketchioapp
Questions

More Related Content

Similar to Sketchio presentation at Parse Developer meetup

building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
tutorialsruby
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
tutorialsruby
 
Final Design Project - Memo (with GUI)
Final Design Project - Memo (with GUI)Final Design Project - Memo (with GUI)
Final Design Project - Memo (with GUI)
Alex Larcheveque
 
Gdc09 Minigames
Gdc09 MinigamesGdc09 Minigames
Gdc09 Minigames
Susan Gold
 

Similar to Sketchio presentation at Parse Developer meetup (20)

Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5
 
Intro to computer vision in .net
Intro to computer vision in .netIntro to computer vision in .net
Intro to computer vision in .net
 
Lab Practices and Works Documentation / Report on Computer Graphics
Lab Practices and Works Documentation / Report on Computer GraphicsLab Practices and Works Documentation / Report on Computer Graphics
Lab Practices and Works Documentation / Report on Computer Graphics
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
 
SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...
SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...
SenchaCon 2016: Improve Workflow Driven Applications with Ext JS Draw Package...
 
Intro to OpenGL ES 2.0
Intro to OpenGL ES 2.0Intro to OpenGL ES 2.0
Intro to OpenGL ES 2.0
 
Final Design Project - Memo (with GUI)
Final Design Project - Memo (with GUI)Final Design Project - Memo (with GUI)
Final Design Project - Memo (with GUI)
 
Boosting Developer Productivity with Clang
Boosting Developer Productivity with ClangBoosting Developer Productivity with Clang
Boosting Developer Productivity with Clang
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015
 
Gdc09 Minigames
Gdc09 MinigamesGdc09 Minigames
Gdc09 Minigames
 
用 OPENRNDR 將 Chatbot 訊息視覺化
用 OPENRNDR 將 Chatbot 訊息視覺化用 OPENRNDR 將 Chatbot 訊息視覺化
用 OPENRNDR 將 Chatbot 訊息視覺化
 
Android game development
Android game developmentAndroid game development
Android game development
 
3D Design with OpenSCAD
3D Design with OpenSCAD3D Design with OpenSCAD
3D Design with OpenSCAD
 
GL Shading Language Document by OpenGL.pdf
GL Shading Language Document by OpenGL.pdfGL Shading Language Document by OpenGL.pdf
GL Shading Language Document by OpenGL.pdf
 
Rsa Signature: Behind The Scenes
Rsa Signature: Behind The Scenes Rsa Signature: Behind The Scenes
Rsa Signature: Behind The Scenes
 
Building Hierarchy
Building HierarchyBuilding Hierarchy
Building Hierarchy
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
 
Virtual Reality in Android
Virtual Reality in AndroidVirtual Reality in Android
Virtual Reality in Android
 
Graphic Design Lab File.docx
Graphic Design Lab File.docxGraphic Design Lab File.docx
Graphic Design Lab File.docx
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Sketchio presentation at Parse Developer meetup

  • 1. sketchioapp.com Building a drawing mobile app using parse Sketchio is a fun and easy way to quickly make drawings and share them with friends on Facebook, Twitter, Instagram or via email.
  • 2. About me John Tubert @jtubert Group Senior Technical Director, R/GA
  • 3. Agenda ● The app ○ Demo ○ Gallery ○ Design ○ Sketchio 2.0 ○ Libraries ○ Code ○ Backend ○ Challenges ● Website for app ○ Responsive ○ Code ○ Testing
  • 7. The app: Design I am not a designer, so why try to be one? Design by the talented Amin Torres
  • 9. The app: libraries ● Testflight sdk ● Flurry sdk ● Parse sdk ● Color selector
  • 10. The app: backend I used parse for the backend, so no databases were created or servers were setup.
  • 12. Parse: Facebook login https://gist.github.com/jtubert/6731509 - (IBAction)loginButtonTouchHandler:(id)sender{ NSArray *permissionsArray = @[@"user_about_me"];
  • 13. Parse: Facebook login https://gist.github.com/jtubert/6731509 - (IBAction)loginButtonTouchHandler:(id)sender{ NSArray *permissionsArray = @[@"user_about_me"]; [PFFacebookUtils logInWithPermissions:permissionsArray block:^(PFUser *user, NSError *error) { if (!user) { if (!error) { NSLog(@"Uh oh. The user cancelled the Facebook login."); } else { NSLog(@"Uh oh. An error occurred: %@", error); } } else if (user.isNew) { [self start]; } else { [self start]; } }]; }
  • 14. Parse: Save sketch https://gist.github.com/jtubert/6731589 - (void)saveSketch:(UIImage *)aSketch { NSData *imageData = UIImageJPEGRepresentation(aSketch, 0.8f); PFFile* photoFile = [PFFile fileWithData:imageData]; [photoFile saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { if (succeeded) { //NSLog(@"Sketch uploaded successfully"); } }];
  • 15. Parse: Save sketch (continue) // create a photo object PFObject *photo = [PFObject objectWithClassName:@”Photo”]; [photo setObject:[PFUser currentUser] forKey:@”user”]; [photo setObject:photoFile forKey:@”image”]; // photos are public, but may only be modified by the user who uploaded them PFACL *photoACL = [PFACL ACLWithUser:[PFUser currentUser]]; [photoACL setPublicReadAccess:YES]; photo.ACL = photoACL; [photo saveInBackground]; }
  • 16. Parse: Get sketches https://gist.github.com/jtubert/6743534 PFQuery *queryPhoto = [PFQuery queryWithClassName:@"Photo"]; [queryPhoto whereKey:@”user” equalTo:[PFUser currentUser]]; [queryPhoto orderByDescending:@"createdAt"]; [queryPhoto findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { //handle sketches }
  • 17. Mirror lines https://gist.github.com/jtubert/6745160 -(void) mirroringX1:(float)x1 y1:(float)y1 x2:(float)x2 y2:(float)y2{ float deltaAngle = 360 / totalLines; float deltaAngleRadian = [self degreesToRadian:deltaAngle]; float centerX = self.frame.size.width / 2; float centerY = self.frame.size.height / 2; float distance1 = [self distX1:x1 y1:y1 x2:centerX y2:centerY]; float distance2 = [self distX1:x2 y1:y2 x2:centerX y2:centerY]; float deltaY1 = y1-centerY; float deltaX1 = x1-centerX; float deltaY2 = y2-centerY; float deltaX2 = x2-centerX;
  • 18. Mirror lines (continue) float angle1 = atan2(deltaY1, deltaX1); float angle2 = atan2(deltaY2, deltaX2); for(int i = 0; i < totalLines;i++){ float newX1 = centerX + distance1 * sin(angle1 + (i * deltaAngleRadian)); float newY1 = centerY - distance1 * cos(angle1 + (i * deltaAngleRadian)); float newX2 = centerX + distance2 * sin(angle2 + (i * deltaAngleRadian)); float newY2 = centerY - distance2 * cos(angle2 + (i * deltaAngleRadian)); [self lineX1:newX1 y1:newY1 x2:newX2 y2:newY2]; } }
  • 19. The app: challenges ● Undo/redo, Erase and background color ● Multiline ● App store down!
  • 20. The website for the app
  • 21. Website: Responsive Using webflow.com to easily create a responsive site...
  • 22. Website - login https://gist.github.com/jtubert/6759029 Parse.initialize(KEY, SECRET); window.fbAsyncInit = function() { // init the FB JS SDK Parse.FacebookUtils.init({ appId : '1386686244890246', // App ID from the app dashboard channelUrl : 'channel.html', // Channel file for x-domain comms status : false, // check login status cookie : true, // enable cookies to allow Parse to access the session xfbml : true // parse XFBML }); }; ….
  • 23. Website - login (continue) $('#signin').click(function (e) { Parse.FacebookUtils.logIn(null, { success: function (user) { console.log("login successful”); }, error: function (user, error) { console.log("Oops, something went wrong."); } });
  • 24. Website - get sketches https://gist.github.com/jtubert/6747749 Parse.initialize(KEY, SECRET); var Photo = Parse.Object.extend("Photo"); var query = new Parse.Query(Photo); query.equalTo("user", Parse.User.current()); query.descending("createdAt"); query.find({ success: function(photosArr) { //show images }, error: function(object, error) { //console.log(error); } });
  • 25. Website: Testing This is a personal projects, and I don’t have many different devices/computers/systems. Hello Browserstack! http://www.browserstack.com/screenshots/471a15bfb6a36a4581d812e2c157fbad0d1c8c38
  • 26. Email: feedback@sketchioapp.com url: http://www.sketchioapp.com Facebook: https://www.facebook.com/sketchioapp Questions