Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I'm planning to develop a native iOS app using Swift on Salesforce1. Any sample code/ guidance which shows how to fire the Salesforce REST API and render the response on UI will be helpful.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

As a starting point, you can refer to this tutorial from Raja Rao (Salesforce Developer Relations Team) which explains how to integrate Swift in your existing Salesforce native iOS app. The source code is available here

share|improve this answer

Please checkout the post at http://4loopers.io/developing-ios-apps-using-swift/ for the steps involved in building an iOS app using Swift from scratch.

The basic steps are: - Create a Swift Project in XCode

  • Download and set up your XCode project as outlined in https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Distribution

  • In the Build Settings—>Header search paths add the paths for the Salesforce Mobile SDK

  • Add an Objective C file. It’ll ask if you want to configure a objective C bridging header. Click Yes and delete the Objective C file and just keep the birding header

  • Import the relevant headers from the Salesforce Mobile SDK

  • Set up Remote App in Salesforce and get the clientid and callback URL to be added to SFDCSettings.swift

share|improve this answer
    
That seems relevant, but stackexchange discourages answers that are just links to other sites. Can you edit your answer to summarize some key points? –  ca_peterson Sep 24 at 2:45
    
It's very relevant and it's an improvement on the tutorial mentioned in the post above. The link has the technical details on building iOS apps for Force.com using Apple's new language named Swift. –  Hari Kolasani Oct 1 at 16:10
    
@HariKolasani, what ca_peterson was trying to say is that you should post relative content (or at least a summary) from the linked page to your answer. Links can break over time which risks making the answer worthless later down the road! I've edited your answer as an example. –  LaceySnr Oct 1 at 23:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.