Giter Club home page Giter Club logo

salesforcemobilesdk-samples's Introduction

Salesforce Mobile SDK Samples

Looking for sample applications for the Salesforce Mobile SDK? You can find a variety of sample apps, covering many different use cases, in the source repositories for the iOS and Android SDKs, respectively:

  • The repository for the Salesforce Mobile SDK for iOS can be found here.
  • The repository for the Salesforce Mobile SDK for Android can be found here.

Check out the README files in the repos for more information about getting your environment set up. It takes virtually no time to get up and running.

iOS Native Sample Applications

You can access all of the iOS sample applications from the SalesforceMobileSDK.xcworkspace Xcode workspace at the root of the iOS repo.

The native iOS sample apps have a lot of functionality you can examine and work into your own apps.

  • The RestAPIExplorer sample app exercises all of the native REST API wrappers. It is under native/SampleApps/RestAPIExplorer.
  • The NativeSqlAggregator sample app shows SQL aggregation examples as well as a native SmartStore implementation. It resides in the Mobile SDK for iOS under native/SampleApps/NativeSqlAggregator.

Android Native Sample Applications

All of the Android sample applications live under the Android SDK repo, and are most easily accessed by importing the root directory of the repo in your Eclipse workspace.

  • RestExplorer is a sample app that demonstrates how to use the OAuth and REST API functions of the SalesforceSDK. It’s also useful to investigate the various REST API actions from a Honeycomb tablet.
    1. To run the application from your Eclipse workspace, right-click the RestExplorer project and choose Run As > Android Application.
    2. To run the tests, right-click the RestExplorerTest project and choose Run As > Android JUnit Test.
  • NativeSqlAggregator is a sample app that demonstrates SQL aggregation with SmartSQL. As such, it also demonstrates a native implementation of SmartStore. To run the application from your Eclipse workspace, right-click the NativeSqlAggregator project and choose Run As > Android Application.

Android Hybrid Sample Applications

As mentioned above, all of the Android sample applications live under the Android SDK repo, and are most easily accessed by importing the root directory of the repo in your Eclipse workspace.

Inside the ./hybrid folder, you can find sample projects and related test applications:

  • AccountEditor: Demonstrates how to use the SmartSync Data Framework to access Salesforce data.
  • ContactExplorer: The ContactExplorer sample app uses PhoneGap (also known as Cordova) to retrieve local device contacts. It also uses the forcetk.mobilesdk.js toolkit to implement REST transactions with the Salesforce REST API. The app uses the OAuth2 support in Salesforce SDK to obtain OAuth credentials, then propagates those credentials to forcetk.mobilesdk.js by sending a javascript event.
  • ContactExplorerTest: Tests for the ContactExplorer sample app.
  • VFConnector: The VFConnector sample app demonstrates how to wrap a Visualforce page in a native container. This example assumes that your org has a Visualforce page called BasicVFTest. The app first obtains OAuth login credentials using the Salesforce SDK OAuth2 support, then uses those credentials to set appropriate webview cookies for accessing Visualforce pages.
  • VFConnectorTest: Test for the VFConnector sample app.
  • SmartStoreExplorer: Lets you explore SmartStore APIs.
  • SmartStoreExplorerTest: Tests for the SmartStoreExplorer sample app.

iOS Hybrid Sample Applications

As mentioned above, you can access all of the iOS sample applications from the SalesforceMobileSDK.xcworkspace Xcode workspace at the root of the iOS repo.

The sample applications contained under the hybrid/SampleApps folder are designed around the PhoneGap SDK. PhoneGap is also known as Cordova. Salesforce Mobile SDK v. 1.4 and later include the Cordova libraries, so no separate installation is required. You can find documentation for the Cordova SDK in their Getting Started Guide.

Inside the hybrid/SampleApps folder, you can find sample projects:

  • AccountEditor: Demonstrates how to use the SmartSync Data Framework to access Salesforce data.
  • ContactExplorer: The ContactExplorer sample app uses PhoneGap (also known as Cordova) to retrieve local device contacts. It also uses the forcetk.mobilesdk.js toolkit to implement REST transactions with the Salesforce REST API. The app uses the OAuth2 support in Salesforce SDK to obtain OAuth credentials, then propagates those credentials to forcetk.mobilesdk.js by sending a JavaScript event.
  • VFConnector: The VFConnector sample app demonstrates how to wrap a Visualforce page in a native container. This example assumes that your org has a Visualforce page called BasicVFTest. The app first obtains OAuth login credentials using the Salesforce SDK OAuth2 support, then uses those credentials to set appropriate webview cookies for accessing Visualforce pages.
  • SmartStoreExplorer: Lets you explore SmartStore APIs.

salesforcemobilesdk-samples's People

Contributors

khawkins avatar wmathurin avatar tstellanova-sfdc avatar bhariharan avatar jamesward avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.