Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.
/ LinkedIn.swift Public archive

LinkedIn SDK iOS dependency eleminating manual import of `linkedin-sdk.framework` into your swift project

License

Notifications You must be signed in to change notification settings

BiAtoms/LinkedIn.swift

Repository files navigation

Platform Cocoapods Compatible Carthage Compatible License

LinkedIn.swift

LinkedIn SDK iOS dependency eleminating manual import of linkedin-sdk.framework into your swift project

Usage

  1. Follow LinkedIn iOS Docs and set up your app
  2. Add following to your AppDelegate.swift
    func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
    
        return LinkedIn.application(app,
                                    open: url,
                                    options: options)
    }
  3. import LinkedInSDK, now can use LISDKSessionManager etc. classes in your project.

Features

LinkedIn.swift simplifies login and fetch user process out of the box. import LinkedInSwift (not LinkedInSDK)

import LinkedInSwift
// ...
LinkedIn.login(permissions: [.basicProfile, .email] { (user: LinkedInUser?, error: Error?) in
    print(user?.jsonDict as Any, error as Any)
}

LinkedInUser stores user info in jsonDict: [String: Any] field and there are couple of getters to simplify the access those parameters. For more information see LinkedInUser.swift and other files.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate LinkedIn.swift into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
target '<Your Target Name>' do
    pod 'LinkedIn.swift', '~> 1.0'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate LinkedIn.swift into your Xcode project using Carthage, specify it in your Cartfile:

github "BiAtoms/LinkedIn.swift" ~> 1.0

Run carthage update to build the framework and drag the built LinkedInSwift.framework into your Xcode project.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details