Skip to content

Commit

Permalink
Merge pull request #42 from Cidaas/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
cidaas-samples authored Dec 3, 2018
2 parents 6f3fe2a + 47ff145 commit 895bc9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cidaas.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'Cidaas'
s.version = '1.0.10'
s.version = '1.0.11'
s.summary = 'Native SDK for iOS providing login, registration and verification functionalities'
s.homepage = 'https://github.com/Cidaas/cidaas-sdk-ios-v2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
11 changes: 7 additions & 4 deletions Cidaas/Classes/Core/Views/Cidaas.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,14 @@ public class Cidaas {
// -------------------------------------------------------------------------------------------------- //

// set fcm token
public func setFCMToken(sub: String, fcmToken: String) {
public func setFCMToken(sub: String = "", fcmToken: String) {
self.fcmToken = DBHelper.shared.getFCM()
DBHelper.shared.setFCM(fcmToken: fcmToken)
if self.fcmToken != fcmToken {
self.updateFCMToken(sub: sub, fcmId: fcmToken) {
switch $0 {

if sub != "" {
if self.fcmToken != fcmToken {
self.updateFCMToken(sub: sub, fcmId: fcmToken) {
switch $0 {
case .failure(let error):
// log error
let loggerMessage = "Update FCM failure : " + "Error Code - 10001, Error Message - " + error.errorMessage
Expand All @@ -219,6 +221,7 @@ public class Cidaas {
let loggerMessage = "Update FCM success : " + "Status - " + String(describing: successResponse.status)
logw(loggerMessage, cname: "cidaas-sdk-success-log")
break
}
}
}
}
Expand Down

0 comments on commit 895bc9e

Please sign in to comment.