Skip to content

Commit 721df51

Browse files
committed
update fbcoresdkkit library
1 parent 1f93f53 commit 721df51

File tree

12 files changed

+154
-218
lines changed

12 files changed

+154
-218
lines changed

Cidaas.podspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'Cidaas'
11-
s.version = '1.1.6'
11+
s.version = '1.1.7'
1212
s.summary = 'Native SDK for iOS providing login, registration and verification functionalities'
1313
s.homepage = 'https://github.com/Cidaas/cidaas-sdk-ios-v2'
1414
s.license = { :type => 'MIT', :file => 'LICENSE' }
@@ -29,10 +29,10 @@ Pod::Spec.new do |s|
2929

3030
s.subspec 'Facebook' do |fb|
3131
fb.source_files = 'Cidaas/Classes/Facebook/**/*'
32-
fb.dependency 'FBSDKCoreKit', '~> 4.38.0'
33-
fb.dependency 'FBSDKLoginKit', '~> 4.38.0'
34-
fb.dependency 'FacebookCore', '~> 0.4'
35-
fb.dependency 'FacebookLogin', '~> 0.4'
32+
fb.dependency 'FBSDKCoreKit', '5.5.0'
33+
fb.dependency 'FBSDKLoginKit', '5.5.0'
34+
fb.dependency 'FacebookCore', '0.8'
35+
fb.dependency 'FacebookLogin', '0.8'
3636
fb.dependency 'Cidaas/Core'
3737
end
3838

Cidaas/Classes/Facebook/Views/CidaasFacebook.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ public class CidaasFacebook: CidaasFacebookDelegate {
2929

3030
public func login(viewType: String, callback: @escaping(Result<LoginResponseEntity>) -> Void) {
3131

32-
loginManager.logIn(readPermissions: [.email], viewController: delegate) { (loginResult) in
32+
loginManager.logIn(permissions: [.email], viewController: delegate) { (loginResult) in
3333
switch loginResult {
3434
case .cancelled:
3535
callback(Result.failure(error: WebAuthError.shared.userCancelledException()))
3636
break
3737
case .failed:
3838
callback(Result.failure(error: WebAuthError.shared.userCancelledException()))
3939
break
40-
case .success(grantedPermissions: _, declinedPermissions: _, token: _):
40+
case .success(granted: _, declined: _, token: _):
4141
if AccessToken.current != nil {
42-
Cidaas.shared.getAccessToken(socialToken: AccessToken.current?.authenticationToken ?? "", provider: "facebook", viewType: viewType, callback: callback)
42+
Cidaas.shared.getAccessToken(socialToken: AccessToken.current?.tokenString ?? "", provider: "facebook", viewType: viewType, callback: callback)
4343
}
4444
else {
4545
callback(Result.failure(error: WebAuthError.shared.userCancelledException()))

Example/Cidaas.xcodeproj/project.pbxproj

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
1F49FA4E213D007E001A49BB /* DeduplicationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F49FA4D213D007E001A49BB /* DeduplicationTests.swift */; };
3131
1F49FA50213D029E001A49BB /* RegistrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F49FA4F213D029E001A49BB /* RegistrationTests.swift */; };
3232
1F49FA52213D1A54001A49BB /* LinkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F49FA51213D1A54001A49BB /* LinkTests.swift */; };
33-
1F49FA67213D6393001A49BB /* Pods_Cidaas_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F49FA66213D6393001A49BB /* Pods_Cidaas_Example.framework */; };
3433
1F49FA6F213FA087001A49BB /* EntityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F49FA6E213FA087001A49BB /* EntityTests.swift */; };
3534
1F49FA712140B93C001A49BB /* HelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F49FA702140B93C001A49BB /* HelperTests.swift */; };
3635
1F49FA732140C2F2001A49BB /* Test.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1F49FA722140C2F2001A49BB /* Test.plist */; };
@@ -97,7 +96,6 @@
9796
1F49FA60213D6393001A49BB /* Nimble_Snapshots.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Nimble_Snapshots.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9897
1F49FA62213D6393001A49BB /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9998
1F49FA64213D6393001A49BB /* OneTimePassword.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = OneTimePassword.framework; sourceTree = BUILT_PRODUCTS_DIR; };
100-
1F49FA66213D6393001A49BB /* Pods_Cidaas_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Pods_Cidaas_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
10199
1F49FA68213D6393001A49BB /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; };
102100
1F49FA6A213D6393001A49BB /* SCLAlertView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SCLAlertView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
103101
1F49FA6C213D6393001A49BB /* SDWebImage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SDWebImage.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -149,7 +147,6 @@
149147
isa = PBXFrameworksBuildPhase;
150148
buildActionMask = 2147483647;
151149
files = (
152-
1F49FA67213D6393001A49BB /* Pods_Cidaas_Example.framework in Frameworks */,
153150
1762EBBD9E7A2793DF21A793 /* Pods_Cidaas_Tests.framework in Frameworks */,
154151
);
155152
runOnlyForDeploymentPostprocessing = 0;
@@ -296,7 +293,6 @@
296293
1F49FA60213D6393001A49BB /* Nimble_Snapshots.framework */,
297294
1F49FA62213D6393001A49BB /* Nimble.framework */,
298295
1F49FA64213D6393001A49BB /* OneTimePassword.framework */,
299-
1F49FA66213D6393001A49BB /* Pods_Cidaas_Example.framework */,
300296
1F49FA68213D6393001A49BB /* Quick.framework */,
301297
1F49FA6A213D6393001A49BB /* SCLAlertView.framework */,
302298
1F49FA6C213D6393001A49BB /* SDWebImage.framework */,
@@ -446,59 +442,33 @@
446442
buildActionMask = 2147483647;
447443
files = (
448444
);
449-
inputPaths = (
450-
"${SRCROOT}/Pods/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-resources.sh",
451-
"${PODS_ROOT}/GoogleSignIn/Resources/GoogleSignIn.bundle",
445+
inputFileListPaths = (
446+
"${PODS_ROOT}/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-resources-${CONFIGURATION}-input-files.xcfilelist",
452447
);
453448
name = "[CP] Copy Pods Resources";
454-
outputPaths = (
455-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle",
449+
outputFileListPaths = (
450+
"${PODS_ROOT}/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-resources-${CONFIGURATION}-output-files.xcfilelist",
456451
);
457452
runOnlyForDeploymentPostprocessing = 0;
458453
shellPath = /bin/sh;
459-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-resources.sh\"\n";
454+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-resources.sh\"\n";
460455
showEnvVarsInLog = 0;
461456
};
462457
84D70CB9A5305BA7D58B1A3B /* [CP] Embed Pods Frameworks */ = {
463458
isa = PBXShellScriptBuildPhase;
464459
buildActionMask = 2147483647;
465460
files = (
466461
);
467-
inputPaths = (
468-
"${SRCROOT}/Pods/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-frameworks.sh",
469-
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
470-
"${BUILT_PRODUCTS_DIR}/Base32/Base32.framework",
471-
"${BUILT_PRODUCTS_DIR}/Bolts/Bolts.framework",
472-
"${BUILT_PRODUCTS_DIR}/Cidaas/Cidaas.framework",
473-
"${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework",
474-
"${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework",
475-
"${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework",
476-
"${BUILT_PRODUCTS_DIR}/FacebookCore/FacebookCore.framework",
477-
"${BUILT_PRODUCTS_DIR}/FacebookLogin/FacebookLogin.framework",
478-
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
479-
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
480-
"${BUILT_PRODUCTS_DIR}/OneTimePassword/OneTimePassword.framework",
481-
"${BUILT_PRODUCTS_DIR}/SwiftKeychainWrapper/SwiftKeychainWrapper.framework",
462+
inputFileListPaths = (
463+
"${PODS_ROOT}/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-frameworks-${CONFIGURATION}-input-files.xcfilelist",
482464
);
483465
name = "[CP] Embed Pods Frameworks";
484-
outputPaths = (
485-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
486-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Base32.framework",
487-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Bolts.framework",
488-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cidaas.framework",
489-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework",
490-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework",
491-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKLoginKit.framework",
492-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FacebookCore.framework",
493-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FacebookLogin.framework",
494-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
495-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
496-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneTimePassword.framework",
497-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftKeychainWrapper.framework",
466+
outputFileListPaths = (
467+
"${PODS_ROOT}/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-frameworks-${CONFIGURATION}-output-files.xcfilelist",
498468
);
499469
runOnlyForDeploymentPostprocessing = 0;
500470
shellPath = /bin/sh;
501-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-frameworks.sh\"\n";
471+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Cidaas_Example/Pods-Cidaas_Example-frameworks.sh\"\n";
502472
showEnvVarsInLog = 0;
503473
};
504474
AA46F84477FCA8E0C1116A4B /* [CP] Check Pods Manifest.lock */ = {
@@ -524,21 +494,16 @@
524494
buildActionMask = 12;
525495
files = (
526496
);
527-
inputPaths = (
528-
"${SRCROOT}/Pods/Target Support Files/Pods-Cidaas_Tests/Pods-Cidaas_Tests-frameworks.sh",
529-
"${BUILT_PRODUCTS_DIR}/Mockingjay/Mockingjay.framework",
530-
"${BUILT_PRODUCTS_DIR}/Quick/Quick.framework",
531-
"${BUILT_PRODUCTS_DIR}/URITemplate/URITemplate.framework",
497+
inputFileListPaths = (
498+
"${PODS_ROOT}/Target Support Files/Pods-Cidaas_Tests/Pods-Cidaas_Tests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
532499
);
533500
name = "[CP] Embed Pods Frameworks";
534-
outputPaths = (
535-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mockingjay.framework",
536-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework",
537-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/URITemplate.framework",
501+
outputFileListPaths = (
502+
"${PODS_ROOT}/Target Support Files/Pods-Cidaas_Tests/Pods-Cidaas_Tests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
538503
);
539504
runOnlyForDeploymentPostprocessing = 0;
540505
shellPath = /bin/sh;
541-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Cidaas_Tests/Pods-Cidaas_Tests-frameworks.sh\"\n";
506+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Cidaas_Tests/Pods-Cidaas_Tests-frameworks.sh\"\n";
542507
showEnvVarsInLog = 0;
543508
};
544509
/* End PBXShellScriptBuildPhase section */
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>Cidaas_Example.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>21</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
uuid = "719ACC12-FCE9-49B2-88E8-5CEA716A6F33"
4+
type = "0"
5+
version = "2.0">
6+
</Bucket>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>Cidaas-Example.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>1</integer>
11+
</dict>
12+
<key>Cidaas.xcscheme_^#shared#^_</key>
13+
<dict>
14+
<key>orderHint</key>
15+
<integer>0</integer>
16+
</dict>
17+
</dict>
18+
</dict>
19+
</plist>

Example/Cidaas/AppDelegate.swift

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,23 @@ import Cidaas
1111
import FacebookCore
1212
import FacebookLogin
1313
import FBSDKCoreKit
14-
import GoogleSignIn
1514

1615
@UIApplicationMain
17-
class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate {
16+
class AppDelegate: UIResponder, UIApplicationDelegate {
1817

1918
var window: UIWindow?
20-
let google = CidaasGoogle.shared
21-
22-
func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
23-
google.didSignIn(signIn, didSignInFor: user, withError: error)
24-
}
2519

2620
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
2721
// Override point for customization after application launch.
2822
Cidaas.shared.ENABLE_LOG = true
29-
google.configure(self)
30-
SDKApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
23+
24+
ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
3125
return true
3226
}
3327

3428

3529
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
36-
if SDKApplicationDelegate.shared.application(app, open: url, options: options) {
37-
return true
38-
}
39-
else if GIDSignIn.sharedInstance().handle(url, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String, annotation: options[UIApplicationOpenURLOptionsKey.annotation]) {
30+
if ApplicationDelegate.shared.application(app, open: url, options: options) {
4031
return true
4132
}
4233
else {
@@ -54,7 +45,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate {
5445
func applicationDidBecomeActive(_ application: UIApplication) {
5546
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
5647

57-
FBSDKAppEvents.activateApp()
48+
AppEvents.activateApp()
5849
}
5950

6051
func applicationWillResignActive(_ application: UIApplication) {

Example/Cidaas/CidaasGoogle.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
import GoogleSignIn
1111
import Cidaas
1212

13-
public class CidaasGoogle : UIViewController, GIDSignInUIDelegate, CidaasGoogleDelegate {
13+
public class CidaasGoogle : UIViewController, GIDSignInDelegate, CidaasGoogleDelegate {
1414

1515
public static var shared : CidaasGoogle = CidaasGoogle()
1616
var googleCallback: ((Result<LoginResponseEntity>) -> ())!
@@ -30,7 +30,7 @@ public class CidaasGoogle : UIViewController, GIDSignInUIDelegate, CidaasGoogleD
3030
var googleViewController: UIViewController!
3131

3232
public func login(viewType: String, callback: @escaping(Result<LoginResponseEntity>) -> Void) {
33-
GIDSignIn.sharedInstance().uiDelegate = self
33+
GIDSignIn.sharedInstance()?.delegate = self
3434
GIDSignIn.sharedInstance().signIn()
3535

3636
self.viewType = viewType
@@ -56,7 +56,7 @@ public class CidaasGoogle : UIViewController, GIDSignInUIDelegate, CidaasGoogleD
5656
googleViewController.dismiss(animated: true, completion: nil)
5757
}
5858

59-
public func didSignIn(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
59+
public func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
6060
if user != nil {
6161
Cidaas.shared.getAccessToken(socialToken: user.authentication.accessToken ?? "", provider: "google", viewType: self.viewType, callback: googleCallback)
6262
}
@@ -73,7 +73,7 @@ public class CidaasGoogle : UIViewController, GIDSignInUIDelegate, CidaasGoogleD
7373

7474
if let clientID = dict?.object(forKey: "CLIENT_ID") {
7575
GIDSignIn.sharedInstance().clientID = clientID as? String ?? ""
76-
GIDSignIn.sharedInstance().delegate = appDelegate
76+
// GIDSignIn.sharedInstance().delegate = appDelegate
7777
}
7878
}
7979
}

Example/Cidaas/Main.storyboard

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="mMs-dv-jeo">
3-
<device id="retina5_9" orientation="portrait">
4-
<adaptation id="fullscreen"/>
5-
</device>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="mMs-dv-jeo">
3+
<device id="retina5_9" orientation="portrait" appearance="light"/>
64
<dependencies>
75
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
97
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
108
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
119
</dependencies>

0 commit comments

Comments
 (0)