(suppoted Facebook, Twitter, Vkontakte)
- Download SocialManager-iOS and add into your project
- Add SafariServices.framework into your project. See guide.
####Prepare
- Download SDK
- Add VKSdk.framework and VKSdkResources.bundle into your project
- If app use Swift, create Bridging Header and add #import <VKSdk/VKSdk.h>. See guide.
- Add to Bridging Header
#import <VKSdk/VKSdk.h>
- Create VK App. Type - Standalone app
- Check permissions list in VKPermissions class in framework
####Modify Info.plist
- add in CFBundleURLTypes
<dict>
<key>CFBundleURLName</key>
<string>vk1234567</string>
<key>CFBundleURLSchemes</key>
<array>
<string>vk1234567</string>
</array>
</dict>
1234567 - ID application from VK Developers.
- add in LSApplicationQueriesSchemes
<string>vk</string>
<string>vk-share</string>
<string>vkauthorize</string>
- add in NSAppTransportSecurity - NSExceptionDomains
<key>vk.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
####Modify AppDelegate
//iOS 9 workflow
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
VKSdk.processOpenURL(url, fromApplication: options["UIApplicationOpenURLOptionsSourceApplicationKey"] as! String)
return true
}
//iOS 8 and lower
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
VKSdk.processOpenURL(url, fromApplication: sourceApplication)
return true;
}
####Modify SocialLoginManager class
Change vkontakteAppID to ID application from VK Developers.
At the moment SocialManager-iOS uses Fabric to work with twitter
####Prepare
- If you have not used Fablic yet. You should look at Getting Started
- Use function Twitter in Fabric app. Follow the instructions
####Modify AppDelegate
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
Fabric.with([Twitter.self])
return true
}
####Prepare
- Download SDK
- Create Facebook App
- Check permissions list
- Add FBSDKCoreKit, FBSDKLoginKit, FBSDKShareKit into your project
####Modify Info.plist:
- create in Info.plist
<key>FacebookAppID</key>
<string>1234567891234567</string>
<key>FacebookDisplayName</key>
<string>SocialLoginManager</string>
- add in LSApplicationQueriesSchemes
<string>fbauth2</string>
- add in CFBundleURLTypes
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb1234567891234567</string>
</array>
</dict>
- add in NSAppTransportSecurity - NSExceptionDomains
<key>facebook.com</key>
<dict>
<key>NSIncludesSubdomains</key> <true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSIncludesSubdomains</key> <true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/>
</dict>
<key>akamaihd.net</key>
<dict>
<key>NSIncludesSubdomains</key> <true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/>
</dict>
</dict>
1234567891234567, SocialLoginManager - AppID and AppName from Facebook Developers.
####Modify AppDelegate
//iOS 9 workflow
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
FBSDKApplicationDelegate.sharedInstance().application(app, openURL: url, sourceApplication: options["UIApplicationOpenURLOptionsSourceApplicationKey"] as! String, annotation: nil)
return true
}
//iOS 8 and lower
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
return true;
}
func applicationDidBecomeActive(application: UIApplication) {
FBSDKAppEvents.activateApp()
}
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}