JP Aquino JP Aquino - 19 days ago 4x
iOS Question

Error when trying to integrate the Linkedin SDK into my Swift project

I am trying to integrate the Linkedin SDK into my Swift project. I am using this cocoapod and this is the error I'm getting.

Use of unresolved identifier 'LinkedinSwiftHelper'

My podfile:


target 'JobRewards' do
pod 'LinkedinSwift', '~> 1.6.5'


This is the line where I am getting the error, I am declaring this right after the class declaration of my View Controller:

let linkedinHelper = LinkedinSwiftHelper(configuration: LinkedinSwiftConfiguration(clientId: "myclientid", clientSecret: "myclientsecret", state: "mystate", permissions: ["r_basicprofile", "r_emailaddress"]))

My bridging header:

#ifndef ObjectiveCHeader_h
#define ObjectiveCHeader_h

#import <LinkedinSwift/LSHeader.h> // this will use both for POD and import framework.

#endif /* ObjectiveCHeader_h */

My info.plist source code:


On build settings/Objective-C bridging header this is the current path:


Thanks in advance for any help, I have been struggling with this for 2 days.


You shouldn't need the bridging header when using cocoa pods. Are you importing LinkedInSwift in the Swift file that includes that viewcontroller? For me, this compiled with no issues.

import UIKit
import LinkedinSwift

class ViewController: UIViewController {

    let linkedinHelper = LinkedinSwiftHelper()