Slide 1

Slide 1 text

Building your first Hoodie iOS app

Slide 2

Slide 2 text

@kaalita Katrin Apel Freelance iOS developer, former product manager, HOOHoodie maintainer

Slide 3

Slide 3 text

Repetitive Backend Stuff

Slide 4

Slide 4 text

Repetitive Backend Stuff Creating user accounts

Slide 5

Slide 5 text

Repetitive Backend Stuff Creating user accounts User authentication

Slide 6

Slide 6 text

Repetitive Backend Stuff Creating user accounts User authentication User administration

Slide 7

Slide 7 text

Repetitive Backend Stuff Creating user accounts User authentication User administration Storing & retrieving data

Slide 8

Slide 8 text

Repetitive Backend Stuff Creating user accounts User authentication User administration Storing & retrieving data Sharing data

Slide 9

Slide 9 text

There is a Pod for that. HOO

Slide 10

Slide 10 text

$ brew update! $ brew install git! $ brew install node! $ brew install couchdb! $ npm install -g hoodie-cli Install Hoodie & dependencies

Slide 11

Slide 11 text

$ hoodie new mynewapp! $ cd mynewapp! $ hoodie start Create Hoodie App

Slide 12

Slide 12 text

Get HOOHoodie pod ‘HOOHoodie’ , ‘0.2.1’

Slide 13

Slide 13 text

Create HOOHoodie instance #import “HOOHoodie.h" ! ! NSURL *baseURL = [[NSURL alloc] initWithString:@"http://localhost:6001/_api"]; ! self.hoodie = [[HOOHoodie alloc] initWithBaseURL:baseURL];

Slide 14

Slide 14 text

Sign Up [self.hoodie.account signUpUserWithName:@"kaalita" password:@"secretpassword" onSignUp: ^(BOOL signUpSuccessful, NSError *error) { ! }];

Slide 15

Slide 15 text

Sign In [self.hoodie.account signInUserWithName:@"kaalita" password:@"secretpassword" onSignIn: ^(BOOL signInSuccessful, NSError *error) { ! }];

Slide 16

Slide 16 text

Save data NSDictionary *newUnicorn = @{@"name": @"Primrose Rainbow Mane"}; ! [self.hoodie.store saveObject:newUnicorn withType:@"unicorn" onSave: ^(NSDictionary *savedObject, NSError *error) { ! }];

Slide 17

Slide 17 text

Retrieve data ! // Retrieve all objects of one type ! ! NSArray *unicorns = [self.hoodie.store findAllObjectsWithType:@"unicorn"]; ! ! // Retrieve object by id ! NSDictionary *myUnicorn = [self.hoodie.store findObjectWithID:@"unicorn/08858vp" andType:@"unicorn"];

Slide 18

Slide 18 text

The Hoodie Offline Magic Image Credit: Adventure Time http://images.wikia.com/adventuretimewithfinnandjake/images/archive/0/09/20110723003641!FinnMagicWand.gif

Slide 19

Slide 19 text

BACKEND Your App

Slide 20

Slide 20 text

BACKEND Your App

Slide 21

Slide 21 text

BACKEND Your App

Slide 22

Slide 22 text

BACKEND Your App

Slide 23

Slide 23 text

Your App BACKEND Synching Plugins

Slide 24

Slide 24 text

Image Credit: Adventure Time http://www.hdwpapers.com/lady_rainicorn_wallpaper_2-wallpapers.html

Slide 25

Slide 25 text

Find and report ALL THE BUGS Image Credit: Bugs http://visualdesignworkshop.com/wp-content/uploads/2013/10/Natural-History-Insects.png

Slide 26

Slide 26 text

Tell your wishes Image Credit: Aladdin http://www.greenbookblog.org/wp-content/uploads/2012/07/Genie-disney-sidekicks-8531037-1024-768.jpg

Slide 27

Slide 27 text

F U R T H E R R E S O U R C E S • Hoodie Website: http://hood.ie/ • HOOHoodie: https://github.com/kaalita/Hoodie-iOS • Plugin Tutorial: https://github.com/espy/hoodie-plugin-tutorial • Nodejitsu Deployment: https://github.com/hoodiehq/my-first- hoodie#deploy-to-nodejitsu • Hoodie Chat: irc.freenode.net/#hoodie ! • On Twitter: @hoodiehq Image Credit: Adventure Time: http://www.fanaru.com/adventure-time/image/14003/jake-reading-a-book-wallpaper/