Skip to content

Gini-Apps/GASocialLogin-iOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdownify
GASocialLogin

Easy social media log in

Sponsor Version Author Swift Swift

Table of Contents

  1. Support
  2. Requirements
  3. Installation
  4. How to Use
  5. Guides

GASocialLogin support the following social login:

  • Facebook
  • Google
  • iOS 9.0+
  • Xcode 10.0+
  • Swift 4.2+

CocoaPods

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)
}