beyond the force.com toolkit for ios - dreamforce 2011

37
Beyond the Force.com Toolkit for iOS Matthew Botos, Mavens Consulting @BotosCloud We’re Hirin g! Download the code! github.com/mbotos/CaseMemo Developers Track

Upload: matthew-botos

Post on 15-May-2015

1.572 views

Category:

Technology


1 download

DESCRIPTION

You’ve downloaded the Force.com Toolkit for iOS and built your first app, now take it to the next level by adding media attachments from your device and real-time push notifications! Join Mavens Consulting for a code-intensive walk through of the open source Salesforce Case Memo app. You’ll learn how to record audio and upload it as an Attachment to a Case in a background thread. Next, integrate real-time push notifications with Apex trigger callouts to Urban Airship’s REST API. Finally, see how these techniques are used to meet real business requirements in 2nd Opinion, a bespoke Salesforce iPhone app for doctors to manage their relationships with pharmaceutical companies.

TRANSCRIPT

Page 1: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Beyond the Force.com Toolkit for iOS

Matthew Botos, Mavens Consulting

@BotosCloudWe’re Hiring!

Download the code! github.com/mbotos/CaseMemo

Developers Track

Page 2: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Safe Harbor

Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended April 30, 2011. This documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: Beyond the Force.com Toolkit for iOS - Dreamforce 2011
Page 4: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

We’re Going to Build an iPad App

View list of Cases with details

Record, upload, & play audio Attachment

Push notification of closed Cases

Page 5: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

We’re Going Beyond This…

Page 6: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

And we’re going #OpenSource!

github.com/mbotos/CaseMemo

Page 7: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Step 0: Create a Free Dev Org

Page 8: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Setup > Develop > Remote Access

Page 9: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Skip Steps

Step 1: Login with Oauth

Step 2: Get list of Cases

Page 10: Beyond the Force.com Toolkit for iOS - Dreamforce 2011
Page 11: Beyond the Force.com Toolkit for iOS - Dreamforce 2011
Page 12: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Step 3: Cache the OAuth Token

Page 13: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Where should we store it?

NSDefaults

Keychain

CoreData

Page 14: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Keychain

Cryptographically-secure storage

Page 15: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Skip Steps

Step 4: Show Case details

Step 5: Get list of Attachments

Step 6: Add loading indicators

Page 16: Beyond the Force.com Toolkit for iOS - Dreamforce 2011
Page 17: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Step 7: Recording

Page 18: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Step 8: Save Attachment

Page 19: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Step 9: Play Audio

Page 20: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Step 10: Push Notifications

Page 21: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

How Push Notifications Work

Device

Page 22: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Service Setup

Certificates

Urban Airship

Page 23: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Push Registration

Page 24: Beyond the Force.com Toolkit for iOS - Dreamforce 2011
Page 25: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Salesforce Notifications

Page 26: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

What will we use?

Apex Trigger

Apex Class

Web Callout

Page 27: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Salesforce Push Architecture

CasePushNotification Push Notification Interface

Urban Airship Implementation

Mock Implementation

Case Trigger

Page 28: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Push Notification Settings

Page 29: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Push Log

Sending to

https://go.urbanairship.com/api/push/batc

h/: [{"aps": {"alert": "Your case has been

closed”…

System.HttpResponse[Status=OK,

StatusCode=200]

Page 30: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Urban Airship Error Console

Page 31: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

How many web callouts per context?

10

20

50

Page 32: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Governor Limits

Queue web callouts for single batch

Page 33: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Receive Notifications

Page 34: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Beyond Where We Started

Open Source. OAuth. Keychain Secure

Storage. Incremental Loading. Audio

Recording. Audio Playback. Push Notifications.

Page 35: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Thanks for goingBeyond the Force.com Toolkit for iOS!

Matthew Botos

@BotosCloud

We’re Hiring!

Download the code! github.com/mbotos/CaseMemo

Page 36: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

But wait, the DevZone has more!

Hackathon Check out the Finale, Thurs, 2:30pm

Open Source LabDiscover new & interesting open projects

Lightning ForumDrop in for a quick blast of knowledge

Tech Demos

See and learn the latest from the experts

Code Consultations Sign up for 1:1 sessions at the Welcome Desk

@forcedotcom

Page 37: Beyond the Force.com Toolkit for iOS - Dreamforce 2011

Watch your inbox at the end of each day for an email from our survey partner, Alliance Tech.

Click on the personalized link to be directed to the survey page for the sessions you attended.

How Could Dreamforce Be Even Better? Tell Us!

Every session survey you submit is a

chance to win an iPad 2!