• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Creating iOS Applications for Drupal

on

  • 7,496 views

 

Statistics

Views

Total Views
7,496
Views on SlideShare
7,496
Embed Views
0

Actions

Likes
3
Downloads
102
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Mobile is exploding <br /> Clients asked us questions like, how do we get to our mobile audience with drupal? <br />
  • Need small barrier to entry. Drupal needs to be on the forefront of supporting mobile. <br />
  • Kind of means theres services that exist for drupal but dealing with it on the iOS SDK is difficult. <br />
  • left blackberry off. <br />
  • <br />
  • <br />
  • <br />
  • xplantion app store bannings, buggy implementations, missing apis . trying toto understand the fundamentals of the problems were trying to solve.using an application that was xtra layer to the core of what were trying to do, feel like we might not be able to give 100%. this layer added extra complexity and could potentially be a turn off for our enterprise clients. <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Extendable. all classes built on this <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • b/c ASIHTTPREQUESt USer session is stored by cookie <br />
  • <br />
  • <br />
  • <br />

Creating iOS Applications for Drupal Creating iOS Applications for Drupal Presentation Transcript

  • Creating iOS applications with Drupal Kyle Browning WorkHabit
  • Creating iOS applications with Drupal Kyle Browning WorkHabit
  • Follow along. https://github.com/workhabitinc/drupal-ios-sdk https://github.com/workhabitinc/drupal-ios-sdk-example
  • Me http://kylebrowning.com http://workhabit.com http://twitter.com/kylebrowning
  • Things I’ve poured my heart into Drupal iOS SDK (DIOS) CDN2 NameThat Survlog Mogotix
  • Why did we work on this? Well, a couple of reasons
  • Mobile Desktop Mobile 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 2008 2009 2010 2011E 2012E Year Morgan Stanley Internet Report
  • Mobile + Drupal Implementation Available? Web Services Kind of Mobile Web Kind of Analytics Yes! Transactions Nope QR Codes Yes!
  • OpenMobile Type Name iOS Drupal iOS SDK Andrupal, Android DrupalCloud Mobile Web mobileplugin
  • OpenMobile Implementation Name iOS Drupal iOS SDK Android Andrupal Mobile Web ??
  • What is Drupal iOS SDK? DIOS is a lightweight SDK that provides a number of classes to natively connect iOS applications to Drupal. Formerly known as KBDrupalConnect
  • Why not use Titanium?
  • We did not like what we saw. It came down to preferences and being able to feel more confident about what we were doing for our clients.
  • What is Drupal iOS SDK? The Drupal iOS SDK is a lightweight SDK that provides a number of classes to natively connect iOS applications to Drupal.
  • What is Drupal iOS SDK? The Drupal iOS SDK is a lightweight SDK that provides a number of classes to natively connect iOS applications to Drupal. It is a standardized solution to building your iOS applications, and you have 100% control of what it does.
  • Drupal iOS SDK Service ResourceDIOS Class System Connect DIOSConnect Node DIOSNode Comment DIOSComment File DIOSFile Taxonomy DIOSTaxonomy User DIOSUser Views DIOSViews
  • Requirements Drupal 6 Drupal 7 Services 2.x Services 3.x PLIST Server REST Server Plist DIOS 6.x-2.x DIOS 7.x-3.x ASIHTTPRequest ASIHTTPRequest
  • Drupal iOS SDK Service ResourceDIOS Class System Connect DIOSConnect Node DIOSNode Comment DIOSComment File DIOSFile Taxonomy DIOSTaxonomy User DIOSUser Views DIOSViews
  • DIOSConnect Handles connection to Drupal Services Error Handling Plist Serialization Stores User Data Its basically a session handler.
  • Drupal iOS SDK Service ResourceDIOS Class System Connect DIOSConnect Node DIOSNode Comment DIOSComment File DIOSFile Taxonomy DIOSTaxonomy User DIOSUser Views DIOSViews
  • DIOSNode node.get node.save node.delete It extends DIOSConnect
  • DIOSNode node.save DIOSNode *node = [[DIOSNode alloc] initWithSession:session]; NSMutableDictionary *nodeData = [[NSMutableDictionary alloc] init]; [nodeData setObject:[bodySaveField text] forKey:@"body"]; [nodeData setObject:[typeSaveField text] forKey:@"type"]; [nodeData setObject:[titleSaveField text] forKey:@"title"]; [nodeData setObject:[nidSaveField text] forKey:@"nid"]; [nodeData setObject:@"now" forKey:@"date"]; [nodeData setObject:@"1" forKey:@"status"]; [nodeData setObject:[[session userInfo] objectForKey:@"name"] forKey:@"name"]; [node nodeSave:nodeData]; [node release];
  • DIOSNode CCK? • DIOSNode *node = [[DIOSNode alloc] initWithSession:session]; NSMutableDictionary *nodeData = [[NSMutableDictionary alloc] init]; [nodeData setObject:[bodySaveField text] forKey:@"body"]; NSDictionary *fieldBodyValue = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects: [ipadBodyField text], nil] forKeys:[NSArray arrayWithObjects:@"value", nil]]; NSArray *fieldBodyArray = [NSArray arrayWithObject:fieldBodyValue]; [nodeData setObject:fieldBodyArray forKey:@"field_ipad_body"]; [nodeData setObject:[typeSaveField text] forKey:@"type"]; [nodeData setObject:[titleSaveField text] forKey:@"title"]; [nodeData setObject:[nidSaveField text] forKey:@"nid"]; [nodeData setObject:@"now" forKey:@"date"]; [nodeData setObject:@"1" forKey:@"status"]; [nodeData setObject:[[session userInfo] objectForKey:@"name"] forKey:@"name"]; [node nodeSave:nodeData]; [node release];
  • Drupal iOS SDK Service ResourceDIOS Class System Connect DIOSConnect Node DIOSNode Comment DIOSComment File DIOSFile Taxonomy DIOSTaxonomy User DIOSUser Views DIOSViews
  • DIOSFile file.get file.save file.getNodeFiles
  • DIOSFile file.save DIOSFile *aFile = [[DIOSFile alloc] initWithSession:[delegate session]]; NSMutableDictionary *file = [[NSMutableDictionary alloc] init]; NSString *base64Image = [imageData base64EncodedString]; [file setObject:base64Image forKey:@"file"]; [file setObject:@"sites/default/files/temp.jpg" forKey:@"filepath"]; [file setObject:@"temp.jpg" forKey:@"filename"]; [file setObject:timestamp forKey:@"timestamp"]; NSString *fileSize = [NSString stringWithFormat:@"%d", [imageData length]]; [file setObject:fileSize forKey:@"filesize"]; [aFile fileSave:file];
  • Drupal iOS SDK Service ResourceDIOS Class System Connect DIOSConnect Node DIOSNode Comment DIOSComment File DIOSFile Taxonomy DIOSTaxonomy User DIOSUser Views DIOSViews
  • DIOSUser user.get user.save user.login user.logout user.delete
  • DIOSUser login/logout DIOSUser *user = [[DIOSUser alloc] initWithSession:[delegate session]]; [user loginWithUsername:[username text] andPassword:[password text]]; DIOSUser *user = [[DIOSUser alloc] initWithSession:[delegate session]]; [user logout];
  • DEMO
  • Where you can find this awesome crap http://github.com/workhabitinc http://kylebrowning.com http://workhabit.com http://twitter.com/kylebrowning