GASocialLogin support the following social login:
- iOS 9.0+
- Xcode 10.0+
- Swift 4.2+
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate GASocialLogin into your Xcode project using CocoaPods, specify it in your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'GASocialLogin/Facebook'
pod 'GASocialLogin/Google'
end
Then, run the following command:
$ pod install
Call to configure with the servises configuration you want at the application didFinishLaunchingWithOptions, Than call to GASocialLogin.shard.application(application, didFinishLaunchingWithOptions: launchOptions).
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
{
// Override point for customization after application launch.
let facebookConfiguration = GAFacebookLoginConfiguration(facebookURLScheme: "facebookURLScheme")
GASocialLogin.shard.configure(using: [facebookConfiguration])
GASocialLogin.shard.application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}
implement "func application(_ app:, open url: , options: ) -> Bool" and call to GASocialLogin.shard.application(app, open: url, options: options)
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool
{
return GASocialLogin.shard.application(app, open: url, options: options)
}