• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

forcedotcom/SalesforceMobileSDK-Samples: Samples for working with the Salesforce ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

forcedotcom/SalesforceMobileSDK-Samples

开源软件地址(OpenSource Url):

https://github.com/forcedotcom/SalesforceMobileSDK-Samples

开源编程语言(OpenSource Language):

C 72.9%

开源软件介绍(OpenSource 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.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap