LinkedIn SDK iOS dependency eleminating manual import of linkedin-sdk.framework
into your swift project
- Follow LinkedIn iOS Docs and set up your app
- 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) }
import LinkedInSDK
, now can useLISDKSessionManager
etc. classes in your project.
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.
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 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.
- Orkhan Alikhanov - Initial work - OrkhanAlikhanov
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details