Build native apps around your Salesforce data.
Give your users the mobile experience they expect, and increasingly demand, from their enterprise apps. Take full advantage of the raw performance and rich functionality native to each platform. Meet compliance requirements by leveraging each platform's trusted-computing features, like OS-managed credential stores.
Do it all using C#.
- Create, Update, and Delete SObjects.
- Run queries written in SOQL.
- Full-text searching via SOSL.
- Retrieve SObject change notifications (added in v29 of the REST API).
- Use the same C# API for iOS and Android.
- Leverage async/await for keeping your UI responsive, and your code simple.
- Simple, compact, progressive API.
- Easily create your own strongly-typed domain model classes.
// Creates our connection to salesforce.
var client = new SalesforceClient (clientId, clientSecret, redirectUrl);
// Get authenticated users from the local keystore
var users = client.LoadUsers ();
if (!users.Any ())
{
client.AuthenticationComplete += (sender, e) => OnAuthenticationCompleted (e);
// Starts the Salesforce login process.
var loginUI = client.GetLoginInterface ();
DisplayThe(loginUI);
}
else
{
// We're ready to fetch some data!
// Let's grab some sales accounts to display.
IEnumerable<SObject> results = await client.ReadAsync ("SELECT Name, AccountNumber FROM Account");
DoSomethingAmazingWith(results);
}
For more details, see Getting Started.
Are you a Xamarin user? Get the component instead.
Core Libraries
- Salesforce.Core - Plain old .NET 4.5 library. No dependencies on Xamarin stuffs.
- Salesforce.Android - Xamarin.Android project. Source linked from Core, but defines
PLATFORM_ANDROID
andMOBILE
. Includes platform-specificIPlatformAdapter
implementation,AndroidPlatformAdapter
. - Salesforce.iOS - Xamarin.iOS project. Source linked from Core, but defines
PLATFORM_IOS
andMOBILE
. Includes platform-specificIPlatformAdapter
implementation,UIKitPlatformAdapter
.
Sample Apps
- SalesforceSample.Android - Xamarin.Android sample app using
Salesforce.Android
. - SalesforceSample.iOS - Xamarin.iOS sample app using
Salesforce.iOS
.
Tests
- Tests.Android - Xamarin.Android unit test project (NUnit Lite).
- Tests.iOS - Xamarin.iOS unit test project (NUnit Lite).
Distribution
- Package - Source files for building the distribution packages.
Misc
- Documentation - Incorrectly named folder of artwork files, SFDC reference material, and notes.
- Xamarin.Auth - Custom fork of Xamarin.Auth used to implement the SFDC OAuth2 workflow.
1.4.x
Additions
-
Added
Changes
andChangesAsync
for easy retrieval of object change info, which was introduced in v29 of the API. -
Supports "logout" scenario by calling
Client.CurrentUser.RequiresReauthentication = true;
.
Brings assembly version up to 0.9.5092.212xx.
1.3
Additions
- Added
Describe
andDescribeAsync
for easy retrieval of object metadata.
Enhancements
PlatformStrings.CredentialStoreServiceName
is now configurable.
Breaking Changes
Search
andSearchAsync
now returnIEnumerable<SearchResult>
.PlatformStrings.Salesforce
was renamed toPlatformStrings.CredentialStoreServiceName
.
Brings assembly version up to 0.9.5003.24683.
1.2
Enhancements
- Allows
Update
of non-string datatypes, such asDateTime
. - Updated the iOS sample to demonstrate mapping the REST API's
datetime
toSystem.DateTime
.
Additions
- Now throwing two new exceptions:
InvalidClientIdException
andJsonParseException
.
Brings the assembly version up to 0.9.4987.26579.
1.1
Additions
- Added
Search
andSearchAsync
for easy SOSL queries.
Breaking Changes
- Renamed SOQL overloads of
Read
andReadAsync
toQuery
andQueryAsync
. - Renamed extension method parameter
@object
tosobject
to make it easier to use named-parameter syntax.
Brings assembly version up to 0.9.4975.19187.
The first public release of the SalesforceSDK is being released under the terms of the MIT license (despite the fact that the history in GIT contains a template for Apache License 2, that was unreleased until now).