I have a stable project on iOS, with Objetive C. I use cocoapods.

This is my podFile:

platform :ios, 7.0
pod 'RestKit', '~> 0.20.0rc'
pod 'FMDB'
# pod 'FMDB/FTS'                # FMDB with FTS
# pod 'FMDB/standalone'         # FMDB with latest SQLite amalgamation source
# pod 'FMDB/standalone/FTS'     # FMDB with latest SQLite amalgamation source and FTS
pod 'FMDB/SQLCipher'            # FMDB with SQLCipher
pod 'CocoaLumberjack'           #Fichero de log dentro de la app   https://github.com/CocoaLumberjack/CocoaLumberjack
pod 'mailcore2-ios'                #Enviar ficheros de log por correo
pod 'TesseractOCRiOS', '4.0.0'    #OCR 

I can install Salesforce SDK with pods, without any problem:

target 'andromedaTecnico' do

    source 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Specs.git' # need to be first
    source 'https://github.com/CocoaPods/Specs.git'

    pod 'SalesforceSDKCore'
    pod 'SalesforceNetwork'
    pod 'SalesforceRestAPI'
    pod 'SmartStore'
    pod 'SmartSync'

pod 'mailcore2-ios'                #Enviar ficheros de log por correo
pod 'TesseractOCRiOS', '4.0.0'    #OCR

But, when I try to use a class, SalesforceSDKManager by example, I obtain some errors.

I followed this articles: https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/ios_cocoapods.htm

Undefined symbols for architecture arm64:

I tried a lot of things, configurations, … and always I have new and different errors.

Have I forgotten any step?

Thanks a lot.

PD: I use El Capitan, Xcode 7, Objetive C and I can´t change to Swift.

1 Answer 1


I've done this a few times - added the Salesforce iOS SDK to my existing apps. There's actually a tutorial which my good friend Quinton Wall wrote for this. The key steps which you may be missing are

  • Adding a Bridging Header
  • Configuring your AppDelegate

Once these are done, you also need to ensure (quoting from the tutorial)

Then, to handle to end of the authentication flow, specify that your View Controller is a delegate for the MobileSDK:

class MyViewController: UIViewController, SFAuthenticationManagerDelegate
and implement the Delegate's authManagerDidFinish function. 

I typically check if the username has been populated correctly. If it has, only then do I perform the segue to my HomeController.

The SFAuthenticationManagerDelegate does include a didAuthenticate function which is technically the correct place to perform a check for successful login, however I have found that this method gets called prior to the SDK performing a remove view for the Salesforce login screen. The result is that our newly displayed Home ViewController is removed. :( Within the viewDidLoad method, register this controller as a delegate.


func authManagerDidFinish(manager: SFAuthenticationManager!, info: SFOAuthInfo!) {

 if !!SFAuthenticationManager.sharedManager().haveValidSession {
     //call the segue with the name you give it in the storyboard editor
     self.performSegueWithIdentifier("loggedIn", sender: nil)

     //or simply dismiss the login view to return to where you came from
     // self.dismissViewControllerAnimated(true, completion: {})

This should fix it!

  • Hello Gaurav Kheterpal I tried the tutorial from Quinton Wall without success. I write Quinton by Twitter to get help. Now, I import SDK with pod and another libraries, but I can´t use FMDB outside SmartStore. salesforce.stackexchange.com/questions/124465/… Thanks.
    – CesarRN
    Commented Jun 2, 2016 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .